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)
diff --git a/src/screen.c b/src/screen.c
index 82c5ba5..6a7284b 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2697,12 +2697,15 @@
{
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)