Add -M to move-pane and default bindings for M-drag. From Michael Grant.

This commit is contained in:
nicm
2026-06-17 07:52:21 +00:00
parent eafd2bed5d
commit d4defd943a
4 changed files with 96 additions and 12 deletions

View File

@@ -450,6 +450,7 @@ key_bindings_init(void)
/* Mouse button 1 drag on pane. */
"bind -n MouseDrag1Pane { if -F '#{||:#{pane_in_mode},#{mouse_any_flag}}' { send -M } { copy-mode -M } }",
"bind -n M-MouseDrag1Pane { move-pane -M }",
/* Mouse wheel up on pane. */
"bind -n WheelUpPane { if -F '#{||:#{alternate_on},#{pane_in_mode},#{mouse_any_flag}}' { send -M } { copy-mode -e } }",
@@ -468,6 +469,7 @@ key_bindings_init(void)
/* Mouse button 1 drag on border. */
"bind -n MouseDrag1Border { resize-pane -M }",
"bind -n M-MouseDrag1Border { move-pane -M }",
/* Mouse button 1 down on status line. */
"bind -n MouseDown1Status { switch-client -t= }",