diff --git a/tmux.conf b/tmux.conf index b7020d2..5f4cce2 100644 --- a/tmux.conf +++ b/tmux.conf @@ -151,10 +151,12 @@ if-shell 'command -v pbcopy >/dev/null' \ bind-key -Tcopy-mode-vi Escape send -X cancel # cancel v mode bind-key -Tcopy-mode-vi ^v send -X rectangle-toggle # cancel v mode -bind-key -T copy-mode-vi MouseDown1Pane select-pane\; send-keys -X clear-selection +bind-key -T copy-mode-vi MouseDown1Pane select-pane -t = \; send-keys -X cancel bind -n MouseDrag1Pane if -Ft= '#{mouse_any_flag}' 'if -Ft= \"#{pane_in_mode}\" \"copy-mode -eM\" \"send-keys -M\"' 'copy-mode -eM' # (note) {{{ -# The `bind-key -T copy-m...` let a single click do selection clearing for us. +# The `bind-key -T copy-m...` makes a single click leave copy-mode: back to +# the prompt, selection dropped. A drag still selects (MouseDrag1Pane below +# re-enters copy-mode) and a click on another pane still switches to it. # The `bind -n MouseDrag1Pane if -Ft= ...` changes the default binding of # MouseDrag1Pane, the only difference is that we use `copy-mode -eM` instead # of `copy-mode -M`, so that WheelDownPane can trigger copy-mode to exit when