@@ -343,6 +343,9 @@ impl EditorView {
343343 // the rope, to allow cursor highlighting at the end
344344 // of the rope.
345345 let text = text.get_slice(start..end).unwrap_or_else(|| " ".into());
346+ let style = spans
347+ .iter()
348+ .fold(text_style, |acc, span| acc.patch(theme.highlight(span.0)));
346349
347350 use helix_core::graphemes::{grapheme_width, RopeGraphemes};
348351
@@ -352,10 +355,6 @@ impl EditorView {
352355
353356 if LineEnding::from_rope_slice(&grapheme).is_some() {
354357 if !out_of_bounds {
355− let style = spans.iter().fold(text_style, |acc, span| {
356− acc.patch(theme.highlight(span.0))
357− });
358−
359358 // we still want to render an empty cell with the style
360359 surface.set_string(
361360 viewport.x + visual_x - offset.col as u16,
@@ -387,10 +386,6 @@ impl EditorView {
387386 };
388387
389388 if !out_of_bounds {
390− let style = spans.iter().fold(text_style, |acc, span| {
391− acc.patch(theme.highlight(span.0))
392− });
393−
394389 // if we're offscreen just keep going until we hit a new line
395390 surface.set_string(
396391 viewport.x + visual_x - offset.col as u16,