diff --git a/src/gui.c b/src/gui.c
index 31be46c..53e073c 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -31,7 +31,7 @@
 static void gui_update_horiz_scrollbar(int);
 static void gui_set_fg_color(char_u *name);
 static void gui_set_bg_color(char_u *name);
-static win_T *xy2win(int x, int y);
+static win_T *xy2win(int x, int y, mouse_find_T popup);
 
 #ifdef GUI_MAY_FORK
 static void gui_do_fork(void);
@@ -4852,7 +4852,7 @@
 
 #ifdef FEAT_MOUSESHAPE
     /* Get window pointer, and update mouse shape as well. */
-    wp = xy2win(x, y);
+    wp = xy2win(x, y, IGNORE_POPUP);
 #endif
 
     /* Only handle this when 'mousefocus' set and ... */
@@ -4868,7 +4868,7 @@
 	if (x < 0 || x > Columns * gui.char_width)
 	    return;
 #ifndef FEAT_MOUSESHAPE
-	wp = xy2win(x, y);
+	wp = xy2win(x, y, IGNORE_POPUP);
 #endif
 	if (wp == curwin || wp == NULL)
 	    return;	/* still in the same old window, or none at all */
@@ -4930,25 +4930,36 @@
 }
 
 /*
+ * Get the window where the mouse pointer is on.
+ * Returns NULL if not found.
+ */
+    win_T *
+gui_mouse_window(mouse_find_T popup)
+{
+    int		x, y;
+
+    if (!(gui.in_use && (p_mousef || popup == FIND_POPUP)))
+	return NULL;
+    gui_mch_getmouse(&x, &y);
+
+    // Only use the mouse when it's on the Vim window
+    if (x >= 0 && x <= Columns * gui.char_width
+	    && y >= 0 && Y_2_ROW(y) >= tabline_height())
+	return xy2win(x, y, popup);
+    return NULL;
+}
+
+/*
  * Called when mouse should be moved to window with focus.
  */
     void
 gui_mouse_correct(void)
 {
-    int		x, y;
     win_T	*wp = NULL;
 
     need_mouse_correct = FALSE;
 
-    if (!(gui.in_use && p_mousef))
-	return;
-
-    gui_mch_getmouse(&x, &y);
-    /* Don't move the mouse when it's left or right of the Vim window */
-    if (x < 0 || x > Columns * gui.char_width)
-	return;
-    if (y >= 0 && Y_2_ROW(y) >= tabline_height())
-	wp = xy2win(x, y);
+    wp = gui_mouse_window(IGNORE_POPUP);
     if (wp != curwin && wp != NULL)	/* If in other than current window */
     {
 	validate_cline_row();
@@ -4963,7 +4974,7 @@
  * As a side effect update the shape of the mouse pointer.
  */
     static win_T *
-xy2win(int x, int y)
+xy2win(int x, int y, mouse_find_T popup)
 {
     int		row;
     int		col;
@@ -4973,7 +4984,7 @@
     col = X_2_COL(x);
     if (row < 0 || col < 0)		/* before first window */
 	return NULL;
-    wp = mouse_find_win(&row, &col, FALSE);
+    wp = mouse_find_win(&row, &col, popup);
     if (wp == NULL)
 	return NULL;
 #ifdef FEAT_MOUSESHAPE
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 4ee1863..3cf782c 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -4262,6 +4262,32 @@
     if (mouse_scroll_lines == 0)
 	init_mouse_wheel();
 
+#ifdef FEAT_TEXT_PROP
+    {
+	win_T *wp = gui_mouse_window(FIND_POPUP);
+
+	if (wp != NULL && popup_is_popup(wp))
+	{
+	    cmdarg_T cap;
+	    oparg_T	oa;
+
+	    // Mouse hovers over popup window, scroll it if possible.
+	    mouse_row = wp->w_winrow;
+	    mouse_col = wp->w_wincol;
+	    vim_memset(&cap, 0, sizeof(cap));
+	    cap.arg = zDelta < 0 ? MSCR_UP : MSCR_DOWN;
+	    cap.cmdchar = zDelta < 0 ? K_MOUSEUP : K_MOUSEDOWN;
+	    clear_oparg(&oa);
+	    cap.oap = &oa;
+	    nv_mousescroll(&cap);
+	    update_screen(0);
+	    setcursor();
+	    out_flush();
+	    return;
+	}
+    }
+#endif
+
     mch_disable_flush();
     if (mouse_scroll_lines > 0
 	    && mouse_scroll_lines < (size > 2 ? size - 2 : 1))
diff --git a/src/proto/gui.pro b/src/proto/gui.pro
index 2dc09a1..a49ecad 100644
--- a/src/proto/gui.pro
+++ b/src/proto/gui.pro
@@ -52,6 +52,7 @@
 void gui_new_scrollbar_colors(void);
 void gui_focus_change(int in_focus);
 void gui_mouse_moved(int x, int y);
+win_T *gui_mouse_window(mouse_find_T popup);
 void gui_mouse_correct(void);
 void ex_gui(exarg_T *eap);
 int gui_find_bitmap(char_u *name, char_u *buffer, char *ext);
diff --git a/src/version.c b/src/version.c
index 2a09818..79f3576 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2254,
+/**/
     2253,
 /**/
     2252,
