Sync OpenBSD patchset 190:

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:
Tiago Cunha 2009-07-28 22:58:20 +00:00
parent 920b9c5872
commit 1c73e75982
4 changed files with 11 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $Id: mode-key.c,v 1.19 2009-07-28 22:55:59 tcunha Exp $ */
/* $Id: mode-key.c,v 1.20 2009-07-28 22:58:20 tcunha Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@ -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 },

4
tmux.h
View File

@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.394 2009-07-28 22:55:59 tcunha Exp $ */
/* $Id: tmux.h,v 1.395 2009-07-28 22:58:20 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -395,10 +395,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,

View File

@ -1,4 +1,4 @@
/* $Id: window-copy.c,v 1.69 2009-07-28 22:55:59 tcunha Exp $ */
/* $Id: window-copy.c,v 1.70 2009-07-28 22:58:20 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -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:

View File

@ -1,4 +1,4 @@
/* $Id: window-scroll.c,v 1.35 2009-07-28 22:55:59 tcunha Exp $ */
/* $Id: window-scroll.c,v 1.36 2009-07-28 22:58:20 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -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: