Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll speed in tmux in terminal emulator is way too fast #18930

Open
1 task done
fasterthanlime opened this issue Oct 9, 2024 · 4 comments
Open
1 task done

Scroll speed in tmux in terminal emulator is way too fast #18930

fasterthanlime opened this issue Oct 9, 2024 · 4 comments
Labels
bug [core label] mouse interaction Feedback for mouse interaction states, actions, etc terminal Feedback for terminal integration, shell commands, etc

Comments

@fasterthanlime
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

When using the mouse wheel / trackpad to scroll up and down in the terminal in a tmux session with mouse mode enabled, scroll speed is way too fast, compared to a terminal emulator like WezTerm.

Environment

Zed: v0.156.0 (Zed Preview)
OS: macOS 15.0.1
Memory: 8 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Compare and contrast — same tmux session, from WezTerm (reasonable scroll speed) then Zed (way too fast):

CleanShot.2024-10-09.at.18.29.12.mp4

If applicable, attach your Zed.log file to this issue.

Zed.log
@fasterthanlime fasterthanlime added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Oct 9, 2024
@WeetHet
Copy link
Contributor

WeetHet commented Oct 9, 2024

Does this happen in alacritty too? Zed uses alacritty as an underlying terminal library, so it might be an issue with its implementation or with our usage

Edit: I've tested this and the bug is not present in alacritty

@fasterthanlime
Copy link
Author

Alacritty seems to behave okay here:

CleanShot.2024-10-09.at.19.36.40.mp4

@notpeter notpeter added mouse interaction Feedback for mouse interaction states, actions, etc terminal Feedback for terminal integration, shell commands, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Oct 9, 2024
@notpeter
Copy link
Member

notpeter commented Oct 9, 2024

I have enabled Alternate Scroll Mode with "terminal": { "alternate_scroll": "on" } in my settings and can't reproduce what you're seeing where it jumps 5 rows at a time.

Screen.Recording.2024-10-09.at.15.08.48.mov

I've tested with:

  • Logitech M575 Trackball scrollwheel
  • Apple Magic Trackpad 2
  • Apple Magic Mouse 2

In System Preferences->Pointer Control I have the Scroll Speed set to 5/8 for the Trackpad Options and 3/8 for the mouse options, but those does not appear to impact the behavior of Zed.

Steps I used to reproduce: run tmux, then for i in {1..10000}; do echo $i; done
Enter the scroll buffer with ctrl-b [ and scroll away. (q to quit scroll mode)

@WeetHet
Copy link
Contributor

WeetHet commented Oct 9, 2024

I've turned Alternate Scroll mode on and it does not seem to solve this problem, so it must be something else. I've looked into what events we are sending to alacritty, and so far was able to determine that for a scroll up we are sending sgr_mouse_report(..., 64, false) once, which indeed corresponds to scrolling up by one line, and is seemingly the same as alacritty

Also, this is not a tmux-specific bug, as zellij has the same problem when scrolling

@github-actions github-actions bot added admin read Pending admin review triage Maintainer needs to classify the issue labels Nov 5, 2024
@notpeter notpeter removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] mouse interaction Feedback for mouse interaction states, actions, etc terminal Feedback for terminal integration, shell commands, etc
Projects
None yet
Development

No branches or pull requests

3 participants