Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix cursor overlap (#21999)

Aaron Feickert536a958c58fb
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 343102b99ed..69ee6a74eaa 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -7023,7 +7023,16 @@ impl CursorLayout {
let name_origin = if cursor_name.is_top_row {
point(bounds.right() - px(1.), bounds.top())
} else {
- point(bounds.left(), bounds.top() - text_size / 2. - px(1.))
+ match self.shape {
+ CursorShape::Bar => point(
+ bounds.right() - px(2.),
+ bounds.top() - text_size / 2. - px(1.),
+ ),
+ _ => point(
+ bounds.right() - px(1.),
+ bounds.top() - text_size / 2. - px(1.),
+ ),
+ }
};
let mut name_element = div()
.bg(self.color)