mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.2.390
Problem: In some situations the popup menu can be displayed wrong. Solution: Remove the popup menu if the cursor moved. (Lech Lorens)
This commit is contained in:
parent
12682fda7a
commit
be678f86d1
@ -4684,6 +4684,7 @@ ins_complete(c)
|
|||||||
int startcol = 0; /* column where searched text starts */
|
int startcol = 0; /* column where searched text starts */
|
||||||
colnr_T curs_col; /* cursor column */
|
colnr_T curs_col; /* cursor column */
|
||||||
int n;
|
int n;
|
||||||
|
int save_w_wrow;
|
||||||
|
|
||||||
compl_direction = ins_compl_key2dir(c);
|
compl_direction = ins_compl_key2dir(c);
|
||||||
if (!compl_started)
|
if (!compl_started)
|
||||||
@ -5067,6 +5068,7 @@ ins_complete(c)
|
|||||||
/*
|
/*
|
||||||
* Find next match (and following matches).
|
* Find next match (and following matches).
|
||||||
*/
|
*/
|
||||||
|
save_w_wrow = curwin->w_wrow;
|
||||||
n = ins_compl_next(TRUE, ins_compl_key2count(c), ins_compl_use_match(c));
|
n = ins_compl_next(TRUE, ins_compl_key2count(c), ins_compl_use_match(c));
|
||||||
|
|
||||||
/* may undisplay the popup menu */
|
/* may undisplay the popup menu */
|
||||||
@ -5220,6 +5222,12 @@ ins_complete(c)
|
|||||||
/* RedrawingDisabled may be set when invoked through complete(). */
|
/* RedrawingDisabled may be set when invoked through complete(). */
|
||||||
n = RedrawingDisabled;
|
n = RedrawingDisabled;
|
||||||
RedrawingDisabled = 0;
|
RedrawingDisabled = 0;
|
||||||
|
|
||||||
|
/* If the cursor moved we need to remove the pum first. */
|
||||||
|
setcursor();
|
||||||
|
if (save_w_wrow != curwin->w_wrow)
|
||||||
|
ins_compl_del_pum();
|
||||||
|
|
||||||
ins_compl_show_pum();
|
ins_compl_show_pum();
|
||||||
setcursor();
|
setcursor();
|
||||||
RedrawingDisabled = n;
|
RedrawingDisabled = n;
|
||||||
|
@ -681,6 +681,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
390,
|
||||||
/**/
|
/**/
|
||||||
389,
|
389,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user