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.08k stars 3.07k forks source link

Intermittent tab switching failure #19741

Open gregerolsson opened 3 weeks ago

gregerolsson commented 3 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When Cmd-clicking on a symbol to trigger Go To Definition and a new tab is opened, when switching back (using mouse) to the originating tab after some time, and then switching to the tab with the definition (using mouse) after some time, the tab switching fails and instead a bunch of text is selected.

See attached .mov (note that a delay of ~5-6 seconds need to occur between the switching for the problem to trigger):

https://github.com/user-attachments/assets/93bff906-8316-4b70-b137-4aba3c7c734e

Transcript:

  1. Cmd-click to definition of some symbol in another file.
  2. Wait 5-6 seconds
  3. Switch back to originating tab using mouse
  4. Wait 5-6 seconds
  5. Switch back to tab with definition using mouse

Environment

Zed: v0.159.1 (Zed Preview) OS: macOS 13.7.0 Memory: 32 GiB Architecture: x86_64

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.

Zed.log

** Tailing log shows no new log entries when the problem occurs
gregerolsson commented 1 day ago

Some additional info; it does not appear to be necessary to wait before switching tabs for the problem to occur:

https://github.com/user-attachments/assets/b4e934b2-65c1-4c6c-937d-d4d3fe9b3022

Zed: v0.162.1 (Zed Preview) OS: macOS 15.0.1 Memory: 32 GiB Architecture: x86_64