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
50.14k stars 3.08k forks source link

Go To Line + mouse click jumps to previous view #20658

Open porsager opened 3 days ago

porsager commented 3 days ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When using "go to line/column" and clicking with the mouse in the editor, it jumps to the previous scrolled location.

Reproduction:

Expected: modal is closed, the caret is at the place of a click Actual: modal is closed, the editor jumps elsewhere

Environment

Zed: v0.161.1 (Zed) OS: macOS 14.6.1 Memory: 32 GiB Architecture: aarch64

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

No response

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

No response

SomeoneToIgnore commented 3 days ago

There has to be something else, as it's not reproducible in a regular file for me:

https://github.com/user-attachments/assets/306c801e-8945-4493-a2bf-b0d9e1b7eb65

Not sure what to ask for, though, maybe a video for starters? Trying in a few projects (of different languages) seems to be nice to do too.

porsager commented 3 days ago

Don't press enter before you click with the mouse ;)

SomeoneToIgnore commented 3 days ago

Ooh, thank you, this is indeed bad. Will update the description with the proper sequence.

porsager commented 3 days ago

https://github.com/user-attachments/assets/771249ae-c053-48c9-a4cc-f10d0f8fe9d4

porsager commented 3 days ago

Ah you got it - well now there's a video too :P