mirror of
https://github.com/sharkdp/bat
synced 2024-11-23 04:13:11 +00:00
Fix off-by-one error in line number continuation
This commit is contained in:
parent
5a2a20af42
commit
9d77c1373c
2 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue