@@ -529,6 +529,8 @@ impl EditorView {
529 (grapheme.as_ref(), width)
529 (grapheme.as_ref(), width)
532+ let cut_off_start = offset.col.saturating_sub(visual_x as usize);
532 if !out_of_bounds {
534 if !out_of_bounds {
533 // if we're offscreen just keep going until we hit a new line
535 // if we're offscreen just keep going until we hit a new line
534 surface.set_string(
536 surface.set_string(
@@ -541,7 +543,24 @@ impl EditorView {
546+ } else if cut_off_start != 0 && cut_off_start < width {
547+ // partially on screen
548+ let rect = Rect::new(
551+ (width - cut_off_start) as u16,
557+ style.patch(whitespace_style)
545 if is_in_indent_area && !(grapheme == " " || grapheme == "\t") {
564 if is_in_indent_area && !(grapheme == " " || grapheme == "\t") {
546 draw_indent_guides(visual_x, line, surface);
565 draw_indent_guides(visual_x, line, surface);
547 is_in_indent_area = false;
566 is_in_indent_area = false;