forked from aniani/vim
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)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user