@@ -343,6 +343,9 @@ impl EditorView {
343 // the rope, to allow cursor highlighting at the end
343 // the rope, to allow cursor highlighting at the end
344 // of the rope.
344 // of the rope.
345 let text = text.get_slice(start..end).unwrap_or_else(|| " ".into());
345 let text = text.get_slice(start..end).unwrap_or_else(|| " ".into());
348+ .fold(text_style, |acc, span| acc.patch(theme.highlight(span.0)));
347 use helix_core::graphemes::{grapheme_width, RopeGraphemes};
350 use helix_core::graphemes::{grapheme_width, RopeGraphemes};
@@ -352,10 +355,6 @@ impl EditorView {
353 if LineEnding::from_rope_slice(&grapheme).is_some() {
356 if LineEnding::from_rope_slice(&grapheme).is_some() {
354 if !out_of_bounds {
357 if !out_of_bounds {
355− let style = spans.iter().fold(text_style, |acc, span| {
356− acc.patch(theme.highlight(span.0))
359 // we still want to render an empty cell with the style
358 // we still want to render an empty cell with the style
360 surface.set_string(
359 surface.set_string(
361 viewport.x + visual_x - offset.col as u16,
360 viewport.x + visual_x - offset.col as u16,
@@ -387,10 +386,6 @@ impl EditorView {
389 if !out_of_bounds {
388 if !out_of_bounds {
390− let style = spans.iter().fold(text_style, |acc, span| {
391− acc.patch(theme.highlight(span.0))
394 // if we're offscreen just keep going until we hit a new line
389 // if we're offscreen just keep going until we hit a new line
395 surface.set_string(
390 surface.set_string(
396 viewport.x + visual_x - offset.col as u16,
391 viewport.x + visual_x - offset.col as u16,