Highlight empty lines correctly

This commit is contained in:
Jeremy Soller 2022-10-26 17:52:51 -06:00
parent dacd9bef94
commit a51f5ac4a8
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE

View file

@ -970,6 +970,11 @@ impl<'a> TextBuffer<'a> {
}
}
if run.glyphs.is_empty() && end.line > line_i{
// Highlight all of internal empty lines
range_opt = Some((0, self.width));
}
if let Some((mut min, mut max)) = range_opt.take() {
if end.line > line_i {
// Draw to end of line