banga / git-split-diffs

Syntax highlighted side-by-side diffs in your terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Diff line overflow when diff include chinese or japanese or korean

gitsang opened this issue · comments

image

I think it's because C/J/K letter occupies two bytes.

Is there any way to fix it?

And there are my gitconfigs:

[pager]
    diff = "git-split-diffs --color=16m | less -RFX"
[split-diffs]
    theme-name = dark

Yes, same as #11. The main issue is that we need to switch to something that implements grapheme-aware string lengths (https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries). I haven't gotten around to it because it's a fairly involved change, but thanks for the nudge.

Hi @gitsang, I just pushed a change to handle wide characters. It should be in the v0.15 release. Can you try it out and let me know if there are any remaining issues?

Cool, it fixed now, thx. 👍