@@ -139,6 +139,7 @@ impl EditorView {
139 let mut visual_x = 0u16;
139 let mut visual_x = 0u16;
140 let mut line = 0u16;
140 let mut line = 0u16;
141 let tab_width = doc.tab_width();
141 let tab_width = doc.tab_width();
142+ let tab = " ".repeat(tab_width);
143 let highlights = highlights.into_iter().map(|event| match event.unwrap() {
144 let highlights = highlights.into_iter().map(|event| match event.unwrap() {
144 // convert byte offsets to char offset
145 // convert byte offsets to char offset
@@ -235,7 +236,6 @@ impl EditorView {
235 spans.pop();
236 spans.pop();
237 HighlightEvent::Source { start, end } => {
238 HighlightEvent::Source { start, end } => {
238− // TODO: filter out spans out of viewport for now..
239 let text = text.slice(start..end);
239 let text = text.slice(start..end);
241 use helix_core::graphemes::{grapheme_width, RopeGraphemes};
241 use helix_core::graphemes::{grapheme_width, RopeGraphemes};
@@ -285,7 +285,7 @@ impl EditorView {
285 surface.set_string(
285 surface.set_string(
286 viewport.x + visual_x - view.first_col as u16,
286 viewport.x + visual_x - view.first_col as u16,
287 viewport.y + line,
287 viewport.y + line,
288− " ".repeat(tab_width),
288+ &tab,