mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00: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:

committed by
Justin M. Keyes

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
|
* Like screen_puts(), but output "text[len]". When "len" is -1 output up to
|
||||||
* a NUL.
|
* 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;
|
unsigned off;
|
||||||
char_u *ptr = text;
|
char_u *ptr = text;
|
||||||
|
int len = textlen;
|
||||||
int c;
|
int c;
|
||||||
unsigned max_off;
|
unsigned max_off;
|
||||||
int mbyte_blen = 1;
|
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;
|
off += mbyte_cells;
|
||||||
col += mbyte_cells;
|
col += mbyte_cells;
|
||||||
ptr += mbyte_blen;
|
ptr += mbyte_blen;
|
||||||
if (clear_next_cell)
|
if (clear_next_cell) {
|
||||||
|
// This only happens at the end, display one space next.
|
||||||
ptr = (char_u *)" ";
|
ptr = (char_u *)" ";
|
||||||
|
len = -1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
++off;
|
++off;
|
||||||
++col;
|
++col;
|
||||||
|
@@ -215,7 +215,7 @@ static int included_patches[] = {
|
|||||||
//306,
|
//306,
|
||||||
//305,
|
//305,
|
||||||
//304,
|
//304,
|
||||||
//303,
|
303,
|
||||||
302,
|
302,
|
||||||
301,
|
301,
|
||||||
//300,
|
//300,
|
||||||
|
Reference in New Issue
Block a user