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.84k stars 3.15k forks source link

Fix flicker on names over cursors #6997

Open mikayla-maki opened 10 months ago

mikayla-maki commented 10 months ago

Describe the bug / provide steps to reproduce it

When multiple cursors have their username rendering in the same place, it flickers.

Should just be a sort in the right place.

meaghans commented 10 months ago

I'd like to contribute, and am new to contributing to open-source projects. What further details can be provided (files), and how do you suggest a newcomer fix this issue? Thanks. :)

mikayla-maki commented 10 months ago

Hi @meaghans, I'd start by looking in the crates/editor/src/element.rs file, specifically for the lines where Cursor::paint is called. I think the easiest way to fix this would be to just sort the cursors before painting them, perhaps by username, so they always show up in the same order. If it's still unclear, head over to our discord or our fireside hacks, or drop in on us sometime and we can work on it together :)

zephaniahong commented 9 months ago

@meaghans Hi! May I know if you're still interested in taking this issue?

vark1623 commented 9 months ago

I would like to contribute on this issue as my first open-source contribution. Any suggestions on how to approach this?

zephaniahong commented 9 months ago

@vark1623 you can follow the suggestions given above by Mikayla

vark1623 commented 9 months ago

@zephaniahong Understood. I'll start soon.

kuku929 commented 2 months ago

hello, how can I reproduce this bug? correct me if i am wrong but It seems like this bug occurs during a collab session.