Mercurial > vim
diff src/screen.c @ 11265:b25895ab67be v8.0.0518
patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
commit https://github.com/vim/vim/commit/c6cd8409c2993b1476e123fba11cb4b8d743b896
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 29 14:40:47 2017 +0200
patch 8.0.0518: bad fold text when a multi-byte char has a zero byte
Problem: Storing a zero byte from a multi-byte character causes fold text
to show up wrong.
Solution: Avoid putting zero in ScreenLines. (Christian Brabandt,
closes #1567)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 29 Mar 2017 14:45:04 +0200 |
parents | 501f46f7644c |
children | 121d29004998 |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -2697,12 +2697,15 @@ fold_line( { ScreenLinesUC[off + col] = fill_fold; ScreenLinesC[0][off + col] = 0; + ScreenLines[off + col] = 0x80; /* avoid storing zero */ } else ScreenLinesUC[off + col] = 0; - } -#endif - ScreenLines[off + col++] = fill_fold; + col++; + } + else +#endif + ScreenLines[off + col++] = fill_fold; } if (text != buf)