Lazygit: [0;k appearing at end of diff lines when using delta >= 0.2.0

Created on 14 Jul 2020  路  6Comments  路  Source: jesseduffield/lazygit

When viewing diffs using delta, "[0;k" will show up at the end of line changes

To Reproduce
Install delta 0.2.0 or 0.3.0 (older versions work fine) and use the following config.yml:

git:
  paging:
    colorArg: always
    pager: delta -s --dark --paging=never --24-bit-color=never

Note that the issue exists whether or not you use -s (the side-by-side mode).

Expected behavior
There should be no extraneous characters printed.

Screenshots
image

Desktop (please complete the following information):

  • OS: Debian via ChromeOS's Linux container via kitty (though, same issue in ChromeOS's terminal app)
  • Lazygit Version: commit=014e06eefd2a779e3458c23cdd1525b13f697526, build date=2020-07-13T23:47:19Z, build source=binaryRelease, version=0.20.8, os=linux, arch=amd64

Additional context
The issue does not occur if you use delta directly
example: diff -u test1 test2 | delta -s --dark --paging=never --24-bit-color=never

I wasn't totally sure if this bug belongs in lazygit or delta.

FYI @dandavison

bug

Most helpful comment

Thanks @dandavison , that makes sense. I'll have a look at what lazygit's doing when time permits

All 6 comments

Hi @cbeley and @jesseduffield, yes this is a change in delta with 0.2.0: prior to 0.2.0, delta extended colors to the right edge of the terminal window by right-padding with space characters and applying ANSI sequences to set a background color on those spaces. Someone kindly pointed out to me that this was naive and that I should use an ANSI sequence to instruct the terminal emulator to fill the background color to the end of line; no padding needed (a main advantage being that the color then flows with window resizing). @jesseduffield Let me know if I can help further!

Thanks @dandavison , that makes sense. I'll have a look at what lazygit's doing when time permits

Any updates on this?

I won't have time to try it until tomorrow, but if that's okay I will test it and let you know how it works for sure! :D

Okay nenvermind, I had some spare time and decided to give it a go, and it works like a charm! 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

glvr182 picture glvr182  路  6Comments

rubensr-pc picture rubensr-pc  路  5Comments

matthiasroos picture matthiasroos  路  3Comments

tupaschoal picture tupaschoal  路  6Comments

jesseduffield picture jesseduffield  路  6Comments