gregsexton / gitv

gitk for Vim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Gitv_TruncateCommitSubjects with UTF-8 multibyte character message breaks layout

pebble8888 opened this issue · comments

Thanks for bringing this to my attention.

commented

I can't recreate this with my setup. To the original poster or anyone else encountering this, please reply.

Please provide the name of your terminal emulator, some examples of failing strings, the output of this command in vim

:echo &ambiwidth

and the output of this command in the shell

xrdb -query

macOS 10.12.2 sierra

~$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 20 2016 13:00:40)
MacOS X (unix) version
Included patches: 1-91
Compiled by Homebrew

:echo &ambiwidth
single

~$ xrdb -query
bash: xrdb: command not found

.vimrc
let g:Gitv_TruncateCommitSubjects = 1

The commit log is written in Japanese utf-8.

:Gitv result

*  荒川区                              7 weeks ago   pebble8888        [135d197] | 12 db/
*  墨田区                              7 weeks ago   pebble8888        [0ef159d] | 13 lib/
*  葛飾区                              7 weeks ago   pebble8888        [c7c3a9e] | 14 log/
*  行きたいの表示順序を近い順,行ったの表示順<e5>... 8 weeks ago   pebble8888   <- corruption 
commented

I assume you're using either iTerm or Terminal on OSX? I have access to these emulators. Should be able to test soon.

commented

Wasn't the terminal emulator or ambiwidth, I just wasn't seeing this with the characters I was using. Strings are now truncated using their display width.