forked from aniani/vim
updated for version 7.3.535
Problem: Many #ifdefs for MB_MAXBYTES. Solution: Also define MB_MAXBYTES without the +multi_byte feature. Fix places where the buffer didn't include space for a NUL byte.
This commit is contained in:
15
src/screen.c
15
src/screen.c
@@ -6621,16 +6621,17 @@ screen_putchar(c, row, col, attr)
|
||||
int row, col;
|
||||
int attr;
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
char_u buf[MB_MAXBYTES + 1];
|
||||
|
||||
buf[(*mb_char2bytes)(c, buf)] = NUL;
|
||||
#else
|
||||
char_u buf[2];
|
||||
|
||||
buf[0] = c;
|
||||
buf[1] = NUL;
|
||||
#ifdef FEAT_MBYTE
|
||||
if (has_mbyte)
|
||||
buf[(*mb_char2bytes)(c, buf)] = NUL;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
buf[0] = c;
|
||||
buf[1] = NUL;
|
||||
}
|
||||
screen_puts(buf, row, col, attr);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user