From 309b76fb3255529976ff7ade7e29df8624647312 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 27 Jul 2009 20:36:13 +0000 Subject: [PATCH] Remove an unused entry in the mode keys command enum and rename MODEKEYCOPY_QUIT to _CANCEL to match the others. --- mode-key.c | 10 +++++----- tmux.h | 2 -- window-copy.c | 2 +- window-scroll.c | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/mode-key.c b/mode-key.c index 58769eda..154da684 100644 --- a/mode-key.c +++ b/mode-key.c @@ -74,7 +74,7 @@ const struct mode_key_entry mode_key_vi_copy[] = { { ' ', 0, MODEKEYCOPY_STARTSELECTION }, { '$', 0, MODEKEYCOPY_ENDOFLINE }, { '0', 0, MODEKEYCOPY_STARTOFLINE }, - { '\003' /* C-c */, 0, MODEKEYCOPY_QUIT }, + { '\003' /* C-c */, 0, MODEKEYCOPY_CANCEL }, { '\006' /* C-f */, 0, MODEKEYCOPY_NEXTPAGE }, { '\010' /* C-h */, 0, MODEKEYCOPY_LEFT }, { '\025' /* C-u */, 0, MODEKEYCOPY_PREVIOUSPAGE }, @@ -86,7 +86,7 @@ const struct mode_key_entry mode_key_vi_copy[] = { { 'j', 0, MODEKEYCOPY_DOWN }, { 'k', 0, MODEKEYCOPY_UP }, { 'l', 0, MODEKEYCOPY_RIGHT }, - { 'q', 0, MODEKEYCOPY_QUIT }, + { 'q', 0, MODEKEYCOPY_CANCEL }, { 'w', 0, MODEKEYCOPY_NEXTWORD }, { KEYC_BSPACE, 0, MODEKEYCOPY_LEFT }, { KEYC_DOWN, 0, MODEKEYCOPY_DOWN }, @@ -144,7 +144,7 @@ const struct mode_key_entry mode_key_emacs_copy[] = { { '\000' /* C-Space */, 0, MODEKEYCOPY_STARTSELECTION }, { '\001' /* C-a */, 0, MODEKEYCOPY_STARTOFLINE }, { '\002' /* C-b */, 0, MODEKEYCOPY_LEFT }, - { '\003' /* C-c */, 0, MODEKEYCOPY_QUIT }, + { '\003' /* C-c */, 0, MODEKEYCOPY_CANCEL }, { '\005' /* C-e */, 0, MODEKEYCOPY_ENDOFLINE }, { '\006' /* C-f */, 0, MODEKEYCOPY_RIGHT }, { '\007' /* C-g */, 0, MODEKEYCOPY_CLEARSELECTION }, @@ -152,11 +152,11 @@ const struct mode_key_entry mode_key_emacs_copy[] = { { '\020' /* C-p */, 0, MODEKEYCOPY_UP }, { '\026' /* C-v */, 0, MODEKEYCOPY_NEXTPAGE }, { '\027' /* C-w */, 0, MODEKEYCOPY_COPYSELECTION }, - { '\033' /* Escape */, 0, MODEKEYCOPY_QUIT }, + { '\033' /* Escape */, 0, MODEKEYCOPY_CANCEL }, { 'b' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSWORD }, { 'f' | KEYC_ESCAPE, 0, MODEKEYCOPY_NEXTWORD }, { 'm' | KEYC_ESCAPE, 0, MODEKEYCOPY_BACKTOINDENTATION }, - { 'q', 0, MODEKEYCOPY_QUIT }, + { 'q', 0, MODEKEYCOPY_CANCEL }, { 'v' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSPAGE }, { 'w' | KEYC_ESCAPE, 0, MODEKEYCOPY_COPYSELECTION }, { KEYC_DOWN, 0, MODEKEYCOPY_DOWN }, diff --git a/tmux.h b/tmux.h index 505e3d68..67623eee 100644 --- a/tmux.h +++ b/tmux.h @@ -396,10 +396,8 @@ enum mode_key_cmd { MODEKEYCOPY_LEFT, MODEKEYCOPY_NEXTPAGE, MODEKEYCOPY_NEXTWORD, - MODEKEYCOPY_NONE, MODEKEYCOPY_PREVIOUSPAGE, MODEKEYCOPY_PREVIOUSWORD, - MODEKEYCOPY_QUIT, MODEKEYCOPY_RIGHT, MODEKEYCOPY_STARTOFLINE, MODEKEYCOPY_STARTSELECTION, diff --git a/window-copy.c b/window-copy.c index 7ca4cd34..5fbfd0b8 100644 --- a/window-copy.c +++ b/window-copy.c @@ -168,7 +168,7 @@ window_copy_key(struct window_pane *wp, struct client *c, int key) struct screen *s = &data->screen; switch (mode_key_lookup(&data->mdata, key)) { - case MODEKEYCOPY_QUIT: + case MODEKEYCOPY_CANCEL: window_pane_reset_mode(wp); break; case MODEKEYCOPY_LEFT: diff --git a/window-scroll.c b/window-scroll.c index c14d1ab0..d4215338 100644 --- a/window-scroll.c +++ b/window-scroll.c @@ -132,7 +132,7 @@ window_scroll_key(struct window_pane *wp, unused struct client *c, int key) struct screen *s = &data->screen; switch (mode_key_lookup(&data->mdata, key)) { - case MODEKEYCOPY_QUIT: + case MODEKEYCOPY_CANCEL: window_pane_reset_mode(wp); break; case MODEKEYCOPY_LEFT: