jesseduffield / lazygit

simple terminal UI for git commands
MIT License
50.96k stars 1.79k forks source link

Inconsistent git-delta pager behavior on lazygit panel #1854

Open jaredyam opened 2 years ago

jaredyam commented 2 years ago

Describe the bug

When there has Unicode or CJK language characters, the highlighted modification lines with git-delta pager on lazygit panel will have incorrect highlighted background width. However, git-delta does not have this problem.

This problem has a related solved issue in git-delta: Properly calculate string widths with unicode_width by xen0n · Pull Request #55 · dandavison/delta

Screenshots Following screenshots contain some chinese characters which are twice the width of normal English characters. It seems that lazygit does not handle this case properly.

diff with git-delta on console: diff with git-delta on lazygit panel:

Desktop (please complete the following information): commit=7be25a105d389a262ef040133a4270f2f745d255, build date=2022-03-17T07:07:02Z, build source=binaryRelease, version=0.34, os=darwin, arch=amd64

Ryooooooga commented 2 years ago

https://github.com/jesseduffield/gocui/pull/18

jaredyam commented 2 years ago

jesseduffield/gocui#18

Hi, @Ryooooooga, thank for your reply, but I'm still confused about this problem.

DId you mean this issue has already been solved? If so, does there exist any other factors could change this behavior?

Ryooooooga commented 2 years ago

@jaredyam

DId you mean this issue has already been solved?

Not yet, but https://github.com/jesseduffield/gocui/pull/18 solves this issue.

jaredyam commented 2 years ago

Thanks again, really appreciate it if this issue could be fixed in the coming version!

mark2185 commented 2 years ago

@jaredyam does the issue still occur? The fix should be included in v0.35 which landed last week.