summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-18 19:23:45 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-18 19:23:45 +0200
commitf0bc15c769b60f472d411b3ef98d57db510113c1 (patch)
tree7f970397d8e98743ab01e33b707de5a97ded25ac /src/edit.c
parent9513d91be02f654658b8b33ff429a52ff3c4de12 (diff)
patch 8.1.1884: cannot use mouse scroll wheel in popup in Insert modev8.1.1884
Problem: Cannot use mouse scroll wheel in popup in Insert mode. Mouse clicks in popup close the popup menu. Solution: Check if the mouse is in a popup window. Do not let mouse events close the popup menu. (closes #4544)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/edit.c b/src/edit.c
index 4de17aa180..83b4be784d 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -5267,7 +5267,7 @@ ins_mousescroll(int dir)
col = mouse_col;
/* find the window at the pointer coordinates */
- wp = mouse_find_win(&row, &col, FAIL_POPUP);
+ wp = mouse_find_win(&row, &col, FIND_POPUP);
if (wp == NULL)
return;
curwin = wp;
@@ -5288,6 +5288,10 @@ ins_mousescroll(int dir)
(long)(curwin->w_botline - curwin->w_topline));
else
scroll_redraw(dir, 3L);
+# ifdef FEAT_TEXT_PROP
+ if (WIN_IS_POPUP(curwin))
+ popup_set_firstline(curwin);
+# endif
}
#ifdef FEAT_GUI
else