mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.303 #818
Problem: When using double-width characters the text displayed on the command line is sometimes truncated. Solution: Reset the string lenght. (Nobuhiro Takasaki) https://code.google.com/p/vim/source/detail?r=463ef551e9f62b63ac3f85f1f297b668b14bcd09
This commit is contained in:
parent
c388737957
commit
4ccf1125ff
@ -5215,10 +5215,11 @@ void screen_puts(char_u *text, int row, int col, int attr)
|
||||
* Like screen_puts(), but output "text[len]". When "len" is -1 output up to
|
||||
* a NUL.
|
||||
*/
|
||||
void screen_puts_len(char_u *text, int len, int row, int col, int attr)
|
||||
void screen_puts_len(char_u *text, int textlen, int row, int col, int attr)
|
||||
{
|
||||
unsigned off;
|
||||
char_u *ptr = text;
|
||||
int len = textlen;
|
||||
int c;
|
||||
unsigned max_off;
|
||||
int mbyte_blen = 1;
|
||||
@ -5404,8 +5405,11 @@ void screen_puts_len(char_u *text, int len, int row, int col, int attr)
|
||||
off += mbyte_cells;
|
||||
col += mbyte_cells;
|
||||
ptr += mbyte_blen;
|
||||
if (clear_next_cell)
|
||||
if (clear_next_cell) {
|
||||
// This only happens at the end, display one space next.
|
||||
ptr = (char_u *)" ";
|
||||
len = -1;
|
||||
}
|
||||
} else {
|
||||
++off;
|
||||
++col;
|
||||
|
@ -215,7 +215,7 @@ static int included_patches[] = {
|
||||
//306,
|
||||
//305,
|
||||
//304,
|
||||
//303,
|
||||
303,
|
||||
302,
|
||||
301,
|
||||
//300,
|
||||
|
Loading…
Reference in New Issue
Block a user