jesseduffield / jesseduffield/lazygit

Inconsistent git-delta pager behavior on lazygit panel

Open
#1,854 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**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](https://github.com/dandavison/delta/pull/55/commits)

**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:
![](https://i.imgur.com/bPrh5rs.png)
diff with git-delta on lazygit panel:
![](https://i.imgur.com/GmwVnUk.png)

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.