From 85d7afaefc1e2cf8008575a776ec70f51d24e1a6 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 11 Oct 2016 09:30:36 +0000 Subject: 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. --- key-bindings.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'key-bindings.c') 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", -- cgit v1.2.3