vim-patch:8.0.0518

Closes #7086

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 vim/vim#1567)

c6cd8409c2
This commit is contained in:
Justin M. Keyes
2017-07-29 01:44:58 +02:00
parent 49b671f8f1
commit cddd4e613e
3 changed files with 45 additions and 21 deletions

View File

@@ -1924,10 +1924,14 @@ static void fold_line(win_T *wp, long fold_count, foldinfo_T *foldinfo, linenr_T
if (fill_fold >= 0x80) {
ScreenLinesUC[off + col] = fill_fold;
ScreenLinesC[0][off + col] = 0;
} else
ScreenLines[off + col] = 0x80; // avoid storing zero
} else {
ScreenLinesUC[off + col] = 0;
}
col++;
} else {
ScreenLines[off + col++] = fill_fold;
}
ScreenLines[off + col++] = fill_fold;
}
if (text != buf)