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.55k stars 2.64k forks source link

Fix flicker on names over cursors #6997

Open mikayla-maki opened 7 months ago

mikayla-maki commented 7 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 7 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 7 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 6 months ago

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

vark1623 commented 6 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 6 months ago

@vark1623 you can follow the suggestions given above by Mikayla

vark1623 commented 6 months ago

@zephaniahong Understood. I'll start soon.