Skip to content

Commit 9d77c13

Browse files
committed
Fix off-by-one error in line number continuation
1 parent 5a2a20a commit 9d77c13

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Fix long file name wrapping in header, see #2835 (@FilipRazek)
88
- Fix `NO_COLOR` support, see #2767 (@acuteenvy)
99
- Fix handling of inputs with OSC ANSI escape sequences, see #2541 and #2544 (@eth-p)
10+
- Fix panel width when line 10000 wraps, see #2854 (@eth-p)
1011

1112
## Other
1213

src/decorations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Decoration for LineNumberDecoration {
4646
_printer: &InteractivePrinter,
4747
) -> DecorationText {
4848
if continuation {
49-
if line_number > self.cached_wrap_invalid_at {
49+
if line_number >= self.cached_wrap_invalid_at {
5050
let new_width = self.cached_wrap.width + 1;
5151
return DecorationText {
5252
text: self.color.paint(" ".repeat(new_width)).to_string(),

0 commit comments

Comments
 (0)