zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.28k stars 2.87k forks source link

Ignore `vertical_scroll_margin` when the user moves the cursor using the mouse. #18148

Open filippogallizia opened 3 weeks ago

filippogallizia commented 3 weeks ago

Check for existing issues

Describe the feature

Currently, when moving the cursor with the mouse, the vertical_scroll_margin is applied, causing the page to scroll. This results in the cursor no longer aligning with the mouse pointer after clicking, which can feel unintuitive.

Requested Behavior:

Disable the vertical_scroll_margin when the user moves the cursor by clicking with the mouse. The vertical_scroll_margin should still be respected when using keyboard navigation (e.g., arrow keys), but not for mouse interactions.

I come from JetBrains editor which behave like this and I think it's better.

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

https://github.com/user-attachments/assets/d1771a6a-0861-4f67-b22c-a4378556acd4

kuglee commented 1 day ago

Just wanted to report this. It would be nice to have the option to disable this. Coming from Intellij with IdeaVim I really miss this feature.