mirror of
https://github.com/tmux/tmux.git
synced 2025-12-22 07:16:06 +00:00
Add a scroll-to-mouse command for copy mode to scroll to the mouse
position and bind to the scrollbar, brings the scrollbar keys into line with the other mouse keys. From Michael Grant, GitHub issue 4731.
This commit is contained in:
@@ -480,9 +480,9 @@ key_bindings_init(void)
|
||||
"bind -n M-MouseDown3Pane { display-menu -t= -xM -yM -T '#[align=centre]#{pane_index} (#{pane_id})' " DEFAULT_PANE_MENU " }",
|
||||
|
||||
/* Mouse on scrollbar. */
|
||||
"bind -n MouseDown1ScrollbarUp { copy-mode -u }",
|
||||
"bind -n MouseDown1ScrollbarDown { copy-mode -d }",
|
||||
"bind -n MouseDrag1ScrollbarSlider { copy-mode -S }",
|
||||
"bind -n MouseDown1ScrollbarUp { if -Ft= '#{pane_in_mode}' { send -X page-up } {copy-mode -u } }",
|
||||
"bind -n MouseDown1ScrollbarDown { if -Ft= '#{pane_in_mode}' { send -X page-down } {copy-mode -d } }",
|
||||
"bind -n MouseDrag1ScrollbarSlider { if -Ft= '#{pane_in_mode}' { send -X scroll-to-mouse } { copy-mode -S } }",
|
||||
|
||||
/* Copy mode (emacs) keys. */
|
||||
"bind -Tcopy-mode C-Space { send -X begin-selection }",
|
||||
|
||||
Reference in New Issue
Block a user