Scroll copy mode 4 lines per mouse wheel tick instead of half a page #8

Merged
branderson merged 1 commits from tmux-wheel-scroll-4 into master 2026-09-02 18:58:21 -07:00
Collaborator

Summary generated by LLM agent

What

Scrolling the mouse wheel in copy mode used to jump a half page per tick (20 lines in a 40-line pane) because both the modern and legacy tmux configs bound the wheel to halfpage-up / halfpage-down. Each wheel tick now scrolls 4 lines instead.

How

  • config/tmux/modern.conf (tmux >= 2.4): WheelUpPane/WheelDownPane now run send-keys -X -N 4 scroll-up / scroll-down. This is the same idiom as tmux's own built-in default (which uses -N5); scroll-up/scroll-down take no direct amount argument, so the -N repeat count is the amount, and tmux resets it after each command.
  • config/tmux/legacy.conf (tmux < 2.4): equivalent change using the old syntax, bind-key -R 4 -t vi-copy ... scroll-up/scroll-down, since -N doesn't exist there.

Verification

Built tmux 3.5a from source and sourced the edited modern.conf through a running server:

  • list-keys -T copy-mode-vi shows the new wheel bindings registered cleanly.
  • Entering copy mode and invoking the wheel binding's command moved #{scroll_position} 0 -> 4 -> 8 (exactly 4 lines per tick), while the old halfpage-up jumped 20 in one go; scroll-down steps back 4.
  • The legacy syntax was verified against the tmux 2.3 sources: bind-key -R repeat-count stores the count and copy-mode scroll-up/scroll-down honor it, looping the scroll one line per repetition.

After merging, a prefix + r (config reload) or new tmux session picks this up.

**Summary generated by LLM agent** ## What Scrolling the mouse wheel in copy mode used to jump a half page per tick (20 lines in a 40-line pane) because both the modern and legacy tmux configs bound the wheel to `halfpage-up` / `halfpage-down`. Each wheel tick now scrolls 4 lines instead. ## How - `config/tmux/modern.conf` (tmux >= 2.4): `WheelUpPane`/`WheelDownPane` now run `send-keys -X -N 4 scroll-up` / `scroll-down`. This is the same idiom as tmux's own built-in default (which uses `-N5`); `scroll-up`/`scroll-down` take no direct amount argument, so the `-N` repeat count is the amount, and tmux resets it after each command. - `config/tmux/legacy.conf` (tmux < 2.4): equivalent change using the old syntax, `bind-key -R 4 -t vi-copy ... scroll-up/scroll-down`, since `-N` doesn't exist there. ## Verification Built tmux 3.5a from source and sourced the edited `modern.conf` through a running server: - `list-keys -T copy-mode-vi` shows the new wheel bindings registered cleanly. - Entering copy mode and invoking the wheel binding's command moved `#{scroll_position}` 0 -> 4 -> 8 (exactly 4 lines per tick), while the old `halfpage-up` jumped 20 in one go; `scroll-down` steps back 4. - The legacy syntax was verified against the tmux 2.3 sources: `bind-key -R repeat-count` stores the count and copy-mode `scroll-up`/`scroll-down` honor it, looping the scroll one line per repetition. After merging, a `prefix + r` (config reload) or new tmux session picks this up.
dejima-agent added 1 commit 2026-09-02 18:32:19 -07:00
branderson approved these changes 2026-09-02 18:58:14 -07:00
branderson merged commit cd06db0274 into master 2026-09-02 18:58:21 -07:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: branderson/dotfiles#8