Mercurial > vim
changeset 5923:463ef551e9f6 v7.4.303
updated for version 7.4.303
Problem: When using double-width characters the text displayed on the
command line is sometimes truncated.
Solution: Reset the string lenght. (Nobuhiro Takasaki)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 22 May 2014 16:05:19 +0200 |
parents | 7c64a9da0bde |
children | 64e6c445a397 |
files | src/screen.c src/version.c |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -6916,15 +6916,16 @@ screen_puts(text, row, col, attr) * a NUL. */ void -screen_puts_len(text, len, row, col, attr) +screen_puts_len(text, textlen, row, col, attr) char_u *text; - int len; + int textlen; int row; int col; int attr; { unsigned off; char_u *ptr = text; + int len = textlen; int c; #ifdef FEAT_MBYTE unsigned max_off; @@ -7169,7 +7170,11 @@ screen_puts_len(text, len, row, col, att col += mbyte_cells; ptr += mbyte_blen; if (clear_next_cell) + { + /* This only happens at the end, display one space next. */ ptr = (char_u *)" "; + len = -1; + } } else #endif