tmux: Use SecondClick instead of DoubleClick event

Make the word selection instant by changing the mouse event. If a third
click follows, the selection just changes to the full line.
This commit is contained in:
2024-08-26 12:05:18 +02:00
parent faee7ea2ea
commit 4b8e877305

View File

@@ -26,7 +26,7 @@ bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-no-clear "xclip -se p"
# Select word or line on double or triple click respectively (w/o aborting). # Select word or line on double or triple click respectively (w/o aborting).
# (These are the defaults w/o the `run -d 0.3; send -X copy-pipe-and-cancel`) # (These are the defaults w/o the `run -d 0.3; send -X copy-pipe-and-cancel`)
bind -T copy-mode-vi DoubleClick1Pane select-pane -t= \; send -X select-word bind -T copy-mode-vi SecondClick1Pane select-pane -t= \; send -X select-word
bind -T copy-mode-vi TripleClick1Pane select-pane -t= \; send -X select-line bind -T copy-mode-vi TripleClick1Pane select-pane -t= \; send -X select-line
bind -n DoubleClick1Pane { bind -n DoubleClick1Pane {
select-pane -t= select-pane -t=