mirror of
https://github.com/tmux/tmux.git
synced 2025-01-13 03:48:51 +00:00
Remove an unused entry in the mode keys command enum and rename
MODEKEYCOPY_QUIT to _CANCEL to match the others.
This commit is contained in:
parent
d95274c5f2
commit
309b76fb32
10
mode-key.c
10
mode-key.c
@ -74,7 +74,7 @@ const struct mode_key_entry mode_key_vi_copy[] = {
|
|||||||
{ ' ', 0, MODEKEYCOPY_STARTSELECTION },
|
{ ' ', 0, MODEKEYCOPY_STARTSELECTION },
|
||||||
{ '$', 0, MODEKEYCOPY_ENDOFLINE },
|
{ '$', 0, MODEKEYCOPY_ENDOFLINE },
|
||||||
{ '0', 0, MODEKEYCOPY_STARTOFLINE },
|
{ '0', 0, MODEKEYCOPY_STARTOFLINE },
|
||||||
{ '\003' /* C-c */, 0, MODEKEYCOPY_QUIT },
|
{ '\003' /* C-c */, 0, MODEKEYCOPY_CANCEL },
|
||||||
{ '\006' /* C-f */, 0, MODEKEYCOPY_NEXTPAGE },
|
{ '\006' /* C-f */, 0, MODEKEYCOPY_NEXTPAGE },
|
||||||
{ '\010' /* C-h */, 0, MODEKEYCOPY_LEFT },
|
{ '\010' /* C-h */, 0, MODEKEYCOPY_LEFT },
|
||||||
{ '\025' /* C-u */, 0, MODEKEYCOPY_PREVIOUSPAGE },
|
{ '\025' /* C-u */, 0, MODEKEYCOPY_PREVIOUSPAGE },
|
||||||
@ -86,7 +86,7 @@ const struct mode_key_entry mode_key_vi_copy[] = {
|
|||||||
{ 'j', 0, MODEKEYCOPY_DOWN },
|
{ 'j', 0, MODEKEYCOPY_DOWN },
|
||||||
{ 'k', 0, MODEKEYCOPY_UP },
|
{ 'k', 0, MODEKEYCOPY_UP },
|
||||||
{ 'l', 0, MODEKEYCOPY_RIGHT },
|
{ 'l', 0, MODEKEYCOPY_RIGHT },
|
||||||
{ 'q', 0, MODEKEYCOPY_QUIT },
|
{ 'q', 0, MODEKEYCOPY_CANCEL },
|
||||||
{ 'w', 0, MODEKEYCOPY_NEXTWORD },
|
{ 'w', 0, MODEKEYCOPY_NEXTWORD },
|
||||||
{ KEYC_BSPACE, 0, MODEKEYCOPY_LEFT },
|
{ KEYC_BSPACE, 0, MODEKEYCOPY_LEFT },
|
||||||
{ KEYC_DOWN, 0, MODEKEYCOPY_DOWN },
|
{ KEYC_DOWN, 0, MODEKEYCOPY_DOWN },
|
||||||
@ -144,7 +144,7 @@ const struct mode_key_entry mode_key_emacs_copy[] = {
|
|||||||
{ '\000' /* C-Space */, 0, MODEKEYCOPY_STARTSELECTION },
|
{ '\000' /* C-Space */, 0, MODEKEYCOPY_STARTSELECTION },
|
||||||
{ '\001' /* C-a */, 0, MODEKEYCOPY_STARTOFLINE },
|
{ '\001' /* C-a */, 0, MODEKEYCOPY_STARTOFLINE },
|
||||||
{ '\002' /* C-b */, 0, MODEKEYCOPY_LEFT },
|
{ '\002' /* C-b */, 0, MODEKEYCOPY_LEFT },
|
||||||
{ '\003' /* C-c */, 0, MODEKEYCOPY_QUIT },
|
{ '\003' /* C-c */, 0, MODEKEYCOPY_CANCEL },
|
||||||
{ '\005' /* C-e */, 0, MODEKEYCOPY_ENDOFLINE },
|
{ '\005' /* C-e */, 0, MODEKEYCOPY_ENDOFLINE },
|
||||||
{ '\006' /* C-f */, 0, MODEKEYCOPY_RIGHT },
|
{ '\006' /* C-f */, 0, MODEKEYCOPY_RIGHT },
|
||||||
{ '\007' /* C-g */, 0, MODEKEYCOPY_CLEARSELECTION },
|
{ '\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 },
|
{ '\020' /* C-p */, 0, MODEKEYCOPY_UP },
|
||||||
{ '\026' /* C-v */, 0, MODEKEYCOPY_NEXTPAGE },
|
{ '\026' /* C-v */, 0, MODEKEYCOPY_NEXTPAGE },
|
||||||
{ '\027' /* C-w */, 0, MODEKEYCOPY_COPYSELECTION },
|
{ '\027' /* C-w */, 0, MODEKEYCOPY_COPYSELECTION },
|
||||||
{ '\033' /* Escape */, 0, MODEKEYCOPY_QUIT },
|
{ '\033' /* Escape */, 0, MODEKEYCOPY_CANCEL },
|
||||||
{ 'b' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSWORD },
|
{ 'b' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSWORD },
|
||||||
{ 'f' | KEYC_ESCAPE, 0, MODEKEYCOPY_NEXTWORD },
|
{ 'f' | KEYC_ESCAPE, 0, MODEKEYCOPY_NEXTWORD },
|
||||||
{ 'm' | KEYC_ESCAPE, 0, MODEKEYCOPY_BACKTOINDENTATION },
|
{ 'm' | KEYC_ESCAPE, 0, MODEKEYCOPY_BACKTOINDENTATION },
|
||||||
{ 'q', 0, MODEKEYCOPY_QUIT },
|
{ 'q', 0, MODEKEYCOPY_CANCEL },
|
||||||
{ 'v' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSPAGE },
|
{ 'v' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSPAGE },
|
||||||
{ 'w' | KEYC_ESCAPE, 0, MODEKEYCOPY_COPYSELECTION },
|
{ 'w' | KEYC_ESCAPE, 0, MODEKEYCOPY_COPYSELECTION },
|
||||||
{ KEYC_DOWN, 0, MODEKEYCOPY_DOWN },
|
{ KEYC_DOWN, 0, MODEKEYCOPY_DOWN },
|
||||||
|
2
tmux.h
2
tmux.h
@ -396,10 +396,8 @@ enum mode_key_cmd {
|
|||||||
MODEKEYCOPY_LEFT,
|
MODEKEYCOPY_LEFT,
|
||||||
MODEKEYCOPY_NEXTPAGE,
|
MODEKEYCOPY_NEXTPAGE,
|
||||||
MODEKEYCOPY_NEXTWORD,
|
MODEKEYCOPY_NEXTWORD,
|
||||||
MODEKEYCOPY_NONE,
|
|
||||||
MODEKEYCOPY_PREVIOUSPAGE,
|
MODEKEYCOPY_PREVIOUSPAGE,
|
||||||
MODEKEYCOPY_PREVIOUSWORD,
|
MODEKEYCOPY_PREVIOUSWORD,
|
||||||
MODEKEYCOPY_QUIT,
|
|
||||||
MODEKEYCOPY_RIGHT,
|
MODEKEYCOPY_RIGHT,
|
||||||
MODEKEYCOPY_STARTOFLINE,
|
MODEKEYCOPY_STARTOFLINE,
|
||||||
MODEKEYCOPY_STARTSELECTION,
|
MODEKEYCOPY_STARTSELECTION,
|
||||||
|
@ -168,7 +168,7 @@ window_copy_key(struct window_pane *wp, struct client *c, int key)
|
|||||||
struct screen *s = &data->screen;
|
struct screen *s = &data->screen;
|
||||||
|
|
||||||
switch (mode_key_lookup(&data->mdata, key)) {
|
switch (mode_key_lookup(&data->mdata, key)) {
|
||||||
case MODEKEYCOPY_QUIT:
|
case MODEKEYCOPY_CANCEL:
|
||||||
window_pane_reset_mode(wp);
|
window_pane_reset_mode(wp);
|
||||||
break;
|
break;
|
||||||
case MODEKEYCOPY_LEFT:
|
case MODEKEYCOPY_LEFT:
|
||||||
|
@ -132,7 +132,7 @@ window_scroll_key(struct window_pane *wp, unused struct client *c, int key)
|
|||||||
struct screen *s = &data->screen;
|
struct screen *s = &data->screen;
|
||||||
|
|
||||||
switch (mode_key_lookup(&data->mdata, key)) {
|
switch (mode_key_lookup(&data->mdata, key)) {
|
||||||
case MODEKEYCOPY_QUIT:
|
case MODEKEYCOPY_CANCEL:
|
||||||
window_pane_reset_mode(wp);
|
window_pane_reset_mode(wp);
|
||||||
break;
|
break;
|
||||||
case MODEKEYCOPY_LEFT:
|
case MODEKEYCOPY_LEFT:
|
||||||
|
Loading…
Reference in New Issue
Block a user