fix: keep tmux selection alive after mouse-drag in copy mode

Change MouseDragEnd1Pane from copy-selection-and-cancel to
copy-selection so a drag-select copies but stays in copy mode,
letting you re-select without re-entering copy mode each time.
Press 'q' to exit when done.
This commit is contained in:
Mortdecai
2026-04-24 19:50:24 -04:00
parent 8e70875631
commit 3b06ce752d
+1 -1
View File
@@ -110,7 +110,7 @@ set -g history-limit 200000
setw -g mode-keys vi setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection-and-cancel bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection
# --- Capture & logging --- # --- Capture & logging ---
bind S run-shell 'tmux capture-pane -pS - > ~/logs/capture-#S-#I-#P-$(date +%%s).txt && tmux display "Pane captured to ~/logs/"' bind S run-shell 'tmux capture-pane -pS - > ~/logs/capture-#S-#I-#P-$(date +%%s).txt && tmux display "Pane captured to ~/logs/"'