From 9d77c1373c59f9998b9991f1a58ffc6bf679d087 Mon Sep 17 00:00:00 2001 From: "Ethan P." Date: Sun, 11 Feb 2024 13:49:13 -0800 Subject: [PATCH] Fix off-by-one error in line number continuation --- CHANGELOG.md | 1 + src/decorations.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e13469..c1d55dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Fix long file name wrapping in header, see #2835 (@FilipRazek) - Fix `NO_COLOR` support, see #2767 (@acuteenvy) - Fix handling of inputs with OSC ANSI escape sequences, see #2541 and #2544 (@eth-p) +- Fix panel width when line 10000 wraps, see #2854 (@eth-p) ## Other diff --git a/src/decorations.rs b/src/decorations.rs index d3ed9b34..85d8103a 100644 --- a/src/decorations.rs +++ b/src/decorations.rs @@ -46,7 +46,7 @@ impl Decoration for LineNumberDecoration { _printer: &InteractivePrinter, ) -> DecorationText { if continuation { - if line_number > self.cached_wrap_invalid_at { + if line_number >= self.cached_wrap_invalid_at { let new_width = self.cached_wrap.width + 1; return DecorationText { text: self.color.paint(" ".repeat(new_width)).to_string(),