Fix block cursor does not render italic for vim (#10249)
Release Notes: - Fixed #8799
This commit is contained in:
parent
cf5a113751
commit
0390df27d4
3 changed files with 32 additions and 1 deletions
|
@ -884,13 +884,21 @@ impl EditorElement {
|
|||
SharedString::from(character.to_string())
|
||||
};
|
||||
let len = text.len();
|
||||
|
||||
let font = cursor_row_layout
|
||||
.font_id_for_index(cursor_column)
|
||||
.and_then(|cursor_font_id| {
|
||||
cx.text_system().get_font_for_id(cursor_font_id)
|
||||
})
|
||||
.unwrap_or(self.style.text.font());
|
||||
|
||||
cx.text_system()
|
||||
.shape_line(
|
||||
text,
|
||||
cursor_row_layout.font_size,
|
||||
&[TextRun {
|
||||
len,
|
||||
font: self.style.text.font(),
|
||||
font: font,
|
||||
color: self.style.background,
|
||||
background_color: None,
|
||||
strikethrough: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue