Fix a few regressions related to the flicker fix (#9190)

This pull request fixes
https://github.com/zed-industries/zed/issues/9187 and fixes also ix a
rendering problem that would show cursors on the same plane:


![image](https://github.com/zed-industries/zed/assets/482957/208304a4-286a-4fd9-a3d8-e2913e3a3dc7)


Release Notes:

- N/A
This commit is contained in:
Antonio Scandurra 2024-03-11 18:07:26 +01:00 committed by GitHub
parent b4ddc83e85
commit 91a0923fc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 15 deletions

View file

@ -2083,11 +2083,9 @@ impl EditorElement {
}
fn paint_cursors(&mut self, layout: &mut EditorLayout, cx: &mut ElementContext) {
cx.paint_layer(layout.text_hitbox.bounds, |cx| {
for cursor in &mut layout.cursors {
cursor.paint(layout.content_origin, cx);
}
});
for cursor in &mut layout.cursors {
cursor.paint(layout.content_origin, cx);
}
}
fn paint_scrollbar(&mut self, layout: &mut EditorLayout, cx: &mut ElementContext) {