From 59863b28b345a09660873d13d869db9c9664ac7c Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 6 Aug 2025 11:21:51 +0200 Subject: [PATCH] tmux: Fix scrolling down in alternate mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ¯\_(ツ)_/¯ --- .config/tmux/tmux.conf | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 664bf28..8974471 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -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}"