diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-29 14:40:47 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-29 14:40:47 +0200 |
commit | c6cd8409c2993b1476e123fba11cb4b8d743b896 (patch) | |
tree | 8468d7164d26f4120f70d32710e7160e832c3565 /src/screen.c | |
parent | b6fa30ccc39cdb7f1d07b99fe2f4c6b61671dac2 (diff) | |
download | vim-git-c6cd8409c2993b1476e123fba11cb4b8d743b896.tar.gz |
patch 8.0.0518: bad fold text when a multi-byte char has a zero bytev8.0.0518
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)
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c index 82c5ba57b..6a7284bb4 100644 --- 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; + col++; } + else #endif - ScreenLines[off + col++] = fill_fold; + ScreenLines[off + col++] = fill_fold; } if (text != buf) |