Mercurial > vim
diff src/screen.c @ 8819:a1132255e3e1 v7.4.1697
commit https://github.com/vim/vim/commit/cb0700844c1274fe8bc0ceaffaee0ad21c406f30
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 2 22:14:51 2016 +0200
patch 7.4.1697
Problem: Display problems when the 'ambiwidth' and 'emoji' options are not
set properly or the terminal doesn't behave as expected.
Solution: After drawing an ambiguous width character always position the
cursor.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Apr 2016 22:15:05 +0200 |
parents | b7eb7bbd71d0 |
children | 470ea7526cc6 |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -8052,7 +8052,9 @@ screen_char(unsigned off, int row, int c buf[utfc_char2bytes(off, buf)] = NUL; out_str(buf); - if (utf_char2cells(ScreenLinesUC[off]) > 1) + if (utf_ambiguous_width(ScreenLinesUC[off])) + screen_cur_col = 9999; + else if (utf_char2cells(ScreenLinesUC[off]) > 1) ++screen_cur_col; } else