Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 713fe0f

Browse files
authored
fix off by one error in multiline highlighting
1 parent 46c5588 commit 713fe0f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/display_list/from_snippet.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,10 @@ fn format_body(
427427
});
428428
}
429429

430+
let end_mark = (end - line_start).saturating_sub(1);
430431
let range = (
431-
(end - line_start) - margin_left,
432-
(end - line_start + 1) - margin_left,
432+
end_mark - margin_left,
433+
(end_mark + 1) - margin_left,
433434
);
434435
body.insert(
435436
body_idx + 1,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /