mirror of
https://github.com/vim/vim.git
synced 2025-11-16 23:24:03 -05:00
patch 9.1.0945: ComplMatchIns highlight doesn't end after inserted text
Problem: ComplMatchIns highlight doesn't end after inserted text.
Solution: Handle ComplMatchIns highlight more like search highlight.
Fix off-by-one error. Handle deleting text properly.
(zeertzjq)
closes: #16244
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
beccb33977
commit
f25d8f9312
@@ -912,7 +912,7 @@ ins_compl_insert_bytes(char_u *p, int len)
|
||||
if (len == -1)
|
||||
len = (int)STRLEN(p);
|
||||
ins_bytes_len(p, len);
|
||||
compl_ins_end_col = curwin->w_cursor.col - 1;
|
||||
compl_ins_end_col = curwin->w_cursor.col;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2437,7 +2437,7 @@ ins_compl_stop(int c, int prev_mode, int retval)
|
||||
int compl_len = get_compl_len();
|
||||
|
||||
if ((int)plen > compl_len)
|
||||
ins_compl_insert_bytes(p + compl_len, (int)(plen - compl_len));
|
||||
ins_compl_insert_bytes(p + compl_len, (int)plen - compl_len);
|
||||
}
|
||||
retval = TRUE;
|
||||
}
|
||||
@@ -4264,6 +4264,7 @@ ins_compl_delete(void)
|
||||
if (stop_arrow() == FAIL)
|
||||
return;
|
||||
backspace_until_column(col);
|
||||
compl_ins_end_col = curwin->w_cursor.col;
|
||||
}
|
||||
|
||||
// TODO: is this sufficient for redrawing? Redrawing everything causes
|
||||
|
||||
Reference in New Issue
Block a user