diff options
author | nicm <nicm> | 2016-10-11 09:30:36 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-11 09:30:36 +0000 |
commit | 85d7afaefc1e2cf8008575a776ec70f51d24e1a6 (patch) | |
tree | a21793f0c47a4683a2cf40ea07387e9e402b052d /key-bindings.c | |
parent | 76d6d3641f271be1756e41494960d96714e7ee58 (diff) | |
download | rtmux-85d7afaefc1e2cf8008575a776ec70f51d24e1a6.tar.gz rtmux-85d7afaefc1e2cf8008575a776ec70f51d24e1a6.tar.bz2 rtmux-85d7afaefc1e2cf8008575a776ec70f51d24e1a6.zip |
Support double and triple clicks (they are cumulative, so double is
fired then triple), and use for select-word and select-line in copy
mode. Inspired by a different solution from Omar Sandoval.
Diffstat (limited to 'key-bindings.c')
-rw-r--r-- | key-bindings.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/key-bindings.c b/key-bindings.c index 384a9f8f..f6b17c3c 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -263,6 +263,8 @@ key_bindings_init(void) "bind -Tcopy-mode MouseDragEnd1Pane send -X copy-selection-and-cancel", "bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up", "bind -Tcopy-mode WheelDownPane send -N5 -X scroll-down", + "bind -Tcopy-mode DoubleClick1Pane send -X select-word", + "bind -Tcopy-mode TripleClick1Pane send -X select-line", "bind -Tcopy-mode NPage send -X page-down", "bind -Tcopy-mode PPage send -X page-up", "bind -Tcopy-mode Up send -X cursor-up", @@ -359,6 +361,8 @@ key_bindings_init(void) "bind -Tcopy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel", "bind -Tcopy-mode-vi WheelUpPane send -N5 -X scroll-up", "bind -Tcopy-mode-vi WheelDownPane send -N5 -X scroll-down", + "bind -Tcopy-mode-vi DoubleClick1Pane send -X select-word", + "bind -Tcopy-mode-vi TripleClick1Pane send -X select-line", "bind -Tcopy-mode-vi BSpace send -X cursor-left", "bind -Tcopy-mode-vi NPage send -X page-down", "bind -Tcopy-mode-vi PPage send -X page-up", |