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
|
@ -103,6 +103,18 @@ impl LineLayout {
|
|||
self.width
|
||||
}
|
||||
|
||||
/// The corresponding Font at the given index
|
||||
pub fn font_id_for_index(&self, index: usize) -> Option<FontId> {
|
||||
for run in &self.runs {
|
||||
for glyph in &run.glyphs {
|
||||
if glyph.index >= index {
|
||||
return Some(run.font_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
fn compute_wrap_boundaries(
|
||||
&self,
|
||||
text: &str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue