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.

editor: Preserve font features for vim block cursor (#39474)

Ratazzibc39ed2575f1
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 2dcb1a8c4b4..479f7ef04c6 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -1625,12 +1625,13 @@ impl EditorElement {
.map(|text| {
let len = text.len();
- let font = cursor_row_layout
+ let mut font = cursor_row_layout
.font_id_for_index(cursor_column)
.and_then(|cursor_font_id| {
window.text_system().get_font_for_id(cursor_font_id)
})
.unwrap_or(self.style.text.font());
+ font.features = self.style.text.font_features.clone();
// Invert the text color for the block cursor. Ensure that the text
// color is opaque enough to be visible against the background color.