mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-20 10:57:22 +03:00
Consume newline from run if it spans it
This commit is contained in:
parent
0baa9a782b
commit
f227c3284d
@ -290,7 +290,15 @@ impl TextSystem {
|
||||
text: SharedString::from(line_text),
|
||||
});
|
||||
|
||||
line_start = line_end + 1; // Skip `\n` character.
|
||||
// Skip `\n` character.
|
||||
line_start = line_end + 1;
|
||||
if let Some(run) = runs.peek_mut() {
|
||||
run.len = run.len.saturating_sub(1);
|
||||
if run.len == 0 {
|
||||
runs.next();
|
||||
}
|
||||
}
|
||||
|
||||
font_runs.clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user