tmux: Fix scrolling down in alternate mode
Scrolling down with the mouse wheel in alternate mode (e.g. less) stopped working for me. I'm pretty sure that this used to work, but tmux never had a default binding for WheelDownPane, so I'm unsure from where this change should have come from ¯\_(ツ)_/¯
This commit is contained in:
@@ -117,6 +117,21 @@ bind -T copy-mode-vi WheelDownPane {
|
||||
}
|
||||
}
|
||||
|
||||
# Make mouse wheel scroll down properly in alternate mode
|
||||
bind -n WheelDownPane {
|
||||
send -M
|
||||
if -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" {
|
||||
send -M
|
||||
} {
|
||||
if -F "#{alternate_on}" {
|
||||
send -N5 down
|
||||
} {
|
||||
# we're already at the bottom of the history, so nothing
|
||||
# needs to be done here
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Split panes with > and <
|
||||
unbind %
|
||||
bind < splitw -v -c "#{pane_current_path}"
|
||||
|
||||
Reference in New Issue
Block a user