summaryrefslogtreecommitdiffstats
path: root/mode-key.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-02-06 17:35:01 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-02-06 17:35:01 +0000
commit3ef3802629ffea0bad310e662e52db46763dd582 (patch)
tree93fced61f4d9eab6ead49bf3c4cd9023a6ee3942 /mode-key.c
parent8aba77b7be489a93dc843d7ef4378bd73b5385b1 (diff)
Rectangle copy support, from Robin Lee Powell.
Diffstat (limited to 'mode-key.c')
-rw-r--r--mode-key.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mode-key.c b/mode-key.c
index 175a2a04..1a654fb2 100644
--- a/mode-key.c
+++ b/mode-key.c
@@ -89,6 +89,7 @@ struct mode_key_cmdstr mode_key_cmdstr_copy[] = {
{ MODEKEYCOPY_HISTORYBOTTOM, "history-bottom" },
{ MODEKEYCOPY_HISTORYTOP, "history-top" },
{ MODEKEYCOPY_LEFT, "cursor-left" },
+ { MODEKEYCOPY_RECTANGLETOGGLE, "rectangle-toggle" },
{ MODEKEYCOPY_MIDDLELINE, "middle-line" },
{ MODEKEYCOPY_NEXTPAGE, "page-down" },
{ MODEKEYCOPY_NEXTSPACE, "next-space" },
@@ -207,6 +208,7 @@ const struct mode_key_entry mode_key_vi_copy[] = {
{ 'l', 0, MODEKEYCOPY_RIGHT },
{ 'n', 0, MODEKEYCOPY_SEARCHAGAIN },
{ 'q', 0, MODEKEYCOPY_CANCEL },
+ { 'v', 0, MODEKEYCOPY_RECTANGLETOGGLE },
{ 'w', 0, MODEKEYCOPY_NEXTWORD },
{ KEYC_BSPACE, 0, MODEKEYCOPY_LEFT },
{ KEYC_DOWN | KEYC_CTRL,0, MODEKEYCOPY_SCROLLDOWN },
@@ -276,9 +278,10 @@ struct mode_key_tree mode_key_tree_emacs_choice;
/* emacs copy mode keys. */
const struct mode_key_entry mode_key_emacs_copy[] = {
{ ' ', 0, MODEKEYCOPY_NEXTPAGE },
- { '<' | KEYC_ESCAPE,0, MODEKEYCOPY_HISTORYTOP },
- { '>' | KEYC_ESCAPE, 0, MODEKEYCOPY_HISTORYBOTTOM },
+ { '<' | KEYC_ESCAPE, 0, MODEKEYCOPY_HISTORYTOP },
+ { '>' | KEYC_ESCAPE, 0, MODEKEYCOPY_HISTORYBOTTOM },
{ 'R' | KEYC_ESCAPE, 0, MODEKEYCOPY_TOPLINE },
+ { 'R', 0, MODEKEYCOPY_RECTANGLETOGGLE },
{ '\000' /* C-Space */, 0, MODEKEYCOPY_STARTSELECTION },
{ '\001' /* C-a */, 0, MODEKEYCOPY_STARTOFLINE },
{ '\002' /* C-b */, 0, MODEKEYCOPY_LEFT },