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
46.97k stars 2.7k forks source link

Outline Panel items have flickering effect when typing #15956

Open backsideofdawn opened 1 month ago

backsideofdawn commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When selecting an item in the outline panel, and then typing in the editor, the currently selected item turns the "selected color" whenever a key is pressed, and reverts back to its normal color when it's not. Edit: It only happens when you're adding new characters to the end of a function/method.

https://github.com/user-attachments/assets/a80e4bcb-a959-42ed-8862-ea1826870830

Environment

Zed: v0.147.2 (Zed) OS: Linux X11 linuxmint 21.3 Memory: 14.3 GiB Architecture: x86_64 GPU: AMD Unknown (RADV GFX1103_R1) || radv || Mesa 23.2.1-1ubuntu3.1~22.04.2

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


JosephTLyons commented 1 month ago

cc @SomeoneToIgnore

SomeoneToIgnore commented 2 weeks ago

An interesting edge-case, happens with Python on the edges of the function definitions (and other indent-based languages, I believe).

https://github.com/zed-industries/zed/pull/16512 introduces a debounce timeout on position revealing and makes it more lenient.

I can see almost no flickering after that, albeit most of the time when the very end of the function is appended, I see no function selected in the outline panel. Maybe that can be a better compromise?