summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-03-10 14:15:54 +0100
committerBram Moolenaar <Bram@vim.org>2010-03-10 14:15:54 +0100
commitbe678f86d13a4c613daf74192f177590bc45c2c4 (patch)
treefccbd995d2da9ed6a086640ce91608017e438ffb
parent12682fda7aa95033cc62c93f94b07b57bb49e1c9 (diff)
updated for version 7.2.390v7.2.390
Problem: In some situations the popup menu can be displayed wrong. Solution: Remove the popup menu if the cursor moved. (Lech Lorens)
-rw-r--r--src/edit.c8
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index 43058f8b71..33e580f1b9 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4684,6 +4684,7 @@ ins_complete(c)
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)
@@ -5067,6 +5068,7 @@ ins_complete(c)
/*
* 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 */
@@ -5220,6 +5222,12 @@ ins_complete(c)
/* 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;
diff --git a/src/version.c b/src/version.c
index 109532e7c9..18f3ba5c4e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 390,
+/**/
389,
/**/
388,