Skip to content

Commit 1040990

Browse files
pascalkutheAlexanderDickie
authored andcommitted
ensure highlight scopes are skipped properly
1 parent bdc16eb commit 1040990

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

helix-term/src/ui/document.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,12 @@ pub fn render_text<'t>(
300300
}
301301

302302
// acquire the correct grapheme style
303-
if char_pos >= syntax_style_span.1 {
303+
while char_pos >= syntax_style_span.1 {
304304
syntax_style_span = syntax_styles
305305
.next()
306306
.unwrap_or((Style::default(), usize::MAX));
307307
}
308-
if char_pos >= overlay_style_span.1 {
308+
while char_pos >= overlay_style_span.1 {
309309
overlay_style_span = overlay_styles
310310
.next()
311311
.unwrap_or((Style::default(), usize::MAX));

0 commit comments

Comments
 (0)