Skip to content

Mouse wheel scrolling: long random jumps after switching from another application to ZED #40538

@ardabro

Description

@ardabro

Summary

Mouse wheel scrolling: long random jumps after switching from another application to ZED.
...at least in Debian, Cinnamon. 100% reproduction.

Description

I seems that after switching from another application, the editor incorrectly initializes something related to the current position in the file, and it is definitely associated with the mouse wheel scrolling. When you scroll the wheel with another application focused, then back to ZED, then touch the mouse wheel, it jumps somewhere, far from the last editing cursor position, apparently deriving the current position from the wheel actions performed on another window. It looks like a missing reset of a counter or something like that. At the beginning, I was thinking that it was related to my environment, but I couldn't reproduce this behavior with any other application (including gedit, Sublime Text, Chromium: edit window in GitHub).
UPD: the same behavior in the project pane and in the outline pane. It is something global

Steps to reproduce:

  1. Open zed, set focus in the editor pane, in the middle of a file long enough to see large scrolling jumps.
  2. Switch to another application (alt+tab)
  3. Scroll the wheel (doesn't matter if this application doesn't scroll anything inside its window).
  4. Switch back to zed (alt+tab)
  5. Touch the mouse wheel to trigger.
    100% reproduction.

Expected Behavior:
Current position in the edited file (and project pane and outpline pane) is stable when switching back to ZED after scrolling the mouse wheel on another window.

Actual Behavior:
Current position jumps like crazy.

Zed Version and System Specs

Zed: v0.208.5 (Zed)
OS: Linux X11 debian 13
Memory: 31.1 GiB
Architecture: x86_64
GPU: NVIDIA GeForce GTX 1650 || NVIDIA || 580.95.05

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions