Problem: terminal: second byte of double-byte char wrong
Solution: Set the second byte to NUL only for utf-8 and non-multibyte.
(char*)mb, 2, 0, 0) > 1)
{
ScreenLines[off] = mb[0];
- ScreenLines[off+1] = mb[1];
+ ScreenLines[off + 1] = mb[1];
cell.width = mb_ptr2cells(mb);
}
else
{
if (enc_utf8)
ScreenLinesUC[off] = NUL;
- else if (!has_mbyte)
+
+ /* don't set the second byte to NUL for a DBCS encoding, it
+ * has been set above */
+ if (enc_utf8 || !has_mbyte)
ScreenLines[off] = NUL;
+
++pos.col;
++off;
}
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 987,
/**/
986,
/**/