diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-06-01 15:21:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-06-01 15:21:02 +0200 |
commit | 9a920d8c31bc4d267d8790ba0d83b5774316e08f (patch) | |
tree | 9e3efd2be89a848c17b76251486cf14da09c7e9b /src/screen.c | |
parent | 704984ac87979fd20b8ba732df3abd3197814f7f (diff) | |
download | vim-git-7.3.535.tar.gz |
updated for version 7.3.535v7.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.
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/screen.c b/src/screen.c index fd74707e0..e5a5b1915 100644 --- a/src/screen.c +++ b/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); } |