Merge pull request 'Scroll copy mode 4 lines per mouse wheel tick instead of half a page' (#8) from tmux-wheel-scroll-4 into master

Reviewed-on: #8
Reviewed-by: branderson <brad@branderson.io>
This commit was merged in pull request #8.
This commit is contained in:
2026-09-02 18:58:20 -07:00
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -4,8 +4,11 @@
bind-key -t vi-copy PPage page-up
bind-key -t vi-copy NPage page-down
bind-key -t vi-copy WheelUpPane halfpage-up
bind-key -t vi-copy WheelDownPane halfpage-down
# Mouse wheel scrolls 4 lines per tick, not tmux's half-page default (20 lines
# in a 40-line pane). Old bind-key has no -N; -R is the equivalent repeat
# count for keys in the copy-mode tables.
bind-key -R 4 -t vi-copy WheelUpPane scroll-up
bind-key -R 4 -t vi-copy WheelDownPane scroll-down
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "$HOME/dotfiles/bin/clipboard-copy"
unbind-key -t vi-copy Enter
+5 -2
View File
@@ -3,8 +3,11 @@
bind-key -T copy-mode-vi PPage send-keys -X page-up
bind-key -T copy-mode-vi NPage send-keys -X page-down
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down
# Mouse wheel scrolls 4 lines per tick, not tmux's half-page default (20 lines
# in a 40-line pane). -N is the repeat count; scroll-up/scroll-down take no
# direct amount argument and tmux resets the count after each command.
bind-key -T copy-mode-vi WheelUpPane send-keys -X -N 4 scroll-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X -N 4 scroll-down
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe "$HOME/dotfiles/bin/clipboard-copy"
unbind-key -T copy-mode-vi Enter