From a51f5ac4a850f640150a01c5e8499259cf7ef7cc Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 26 Oct 2022 17:52:51 -0600 Subject: [PATCH] Highlight empty lines correctly --- src/buffer.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/buffer.rs b/src/buffer.rs index 6d73869..77c8ecc 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -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