Skip to content

Commit 8985bd1

Browse files
committed
fix: correctly count tabs for last patch line
1 parent 2156aa8 commit 8985bd1

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/renderer/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1738,7 +1738,7 @@ fn emit_suggestion_default(
17381738
} else if i == newlines - 1 {
17391739
// On the last line, we highlight between the start of the line, and
17401740
// the column of the part span end.
1741-
let extra_width = extra_width_from_tabs(line, span_start.char);
1741+
let extra_width = extra_width_from_tabs(line, span_end.char);
17421742
(0, span_end.char + extra_width)
17431743
} else {
17441744
// On all others, we highlight the whole line.

tests/color/multiline_removal_last_line_tabs.ascii.term.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/color/multiline_removal_last_line_tabs.unicode.term.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)