diff --git a/tmux.conf b/tmux.conf index a3f7c84..6b76418 100644 --- a/tmux.conf +++ b/tmux.conf @@ -166,7 +166,7 @@ bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 2 scroll-up bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 2 scroll-down bind-key -T copy-mode-vi MouseDown1Pane select-pane -t = \; send-keys -X clear-selection bind-key -T copy-mode-vi MouseUp1Pane 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' +bind -n MouseDrag1Pane if -Ft= '#{mouse_any_flag}' 'if -Ft= "#{pane_in_mode}" "copy-mode -eM" "send-keys -M"' 'copy-mode -eM' # (note) {{{ # A plain click (MouseDown then MouseUp, no drag) leaves copy-mode: back to # the prompt, selection dropped. A drag sends MouseDrag/MouseDragEnd instead @@ -176,6 +176,8 @@ bind -n MouseDrag1Pane if -Ft= '#{mouse_any_flag}' 'if -Ft= \"#{pane_in_mode}\" # 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 # copy-mode is entered by MouseDrag1Pane +# Inner quotes stay plain: `\"` is literal inside '...' since tmux 3.0, and the +# mouse-app branch (claude, vim) then dies with "syntax error" on every drag. # }}} bind-key k "split-window -v -b -c '#{pane_current_path}'"