summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-17 17:10:59 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-17 17:10:59 +0200
commit0e6e179f55b85b9e82e74d3f993928d52f0f4d43 (patch)
treef4e72514595911fe85d354d59ef5e673604a53bf
parent942b4541a2d8e8df8369ab70e112dbbbe0c7c0aa (diff)
patch 8.1.0065: balloon displayed at the wrong positionv8.1.0065
Problem: Balloon displayed at the wrong position. Solution: Do not reposition the popup menu at the cursor position.
-rw-r--r--src/popupmnu.c14
-rw-r--r--src/version.c2
2 files changed, 12 insertions, 4 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c
index 66fd6b9c53..5248217255 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -29,6 +29,7 @@ static int pum_scrollbar; /* TRUE when scrollbar present */
static int pum_row; /* top row of pum */
static int pum_col; /* left column of pum */
+static win_T *pum_window = NULL;
static int pum_win_row;
static int pum_win_height;
static int pum_win_col;
@@ -110,6 +111,7 @@ pum_display(
// Remember the essential parts of the window position and size, so we
// can decide when to reposition the popup menu.
+ pum_window = curwin;
pum_win_row = curwin->w_wrow + W_WINROW(curwin);
pum_win_height = curwin->w_height;
pum_win_col = curwin->w_wincol;
@@ -846,10 +848,11 @@ pum_may_redraw(void)
if (!pum_visible())
return; // nothing to do
- if (pum_win_row == curwin->w_wrow + W_WINROW(curwin)
- && pum_win_height == curwin->w_height
- && pum_win_col == curwin->w_wincol
- && pum_win_width == curwin->w_width)
+ if (pum_window != curwin
+ || (pum_win_row == curwin->w_wrow + W_WINROW(curwin)
+ && pum_win_height == curwin->w_height
+ && pum_win_col == curwin->w_wincol
+ && pum_win_width == curwin->w_width))
{
// window position didn't change, redraw in the same position
pum_redraw();
@@ -912,6 +915,9 @@ pum_position_at_mouse(int min_width)
pum_width = Columns - pum_col;
if (pum_width > pum_base_width + 1)
pum_width = pum_base_width + 1;
+
+ // Do not redraw at cursor position.
+ pum_window = NULL;
}
# endif
diff --git a/src/version.c b/src/version.c
index 8159e480c8..192b6cd2aa 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 65,
+/**/
64,
/**/
63,