int startcol = 0; /* column where searched text starts */
colnr_T curs_col; /* cursor column */
int n;
+ int save_w_wrow;
compl_direction = ins_compl_key2dir(c);
if (!compl_started)
/*
* 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));
/* may undisplay the popup menu */
/* RedrawingDisabled may be set when invoked through complete(). */
n = RedrawingDisabled;
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();
setcursor();
RedrawingDisabled = n;