updated for version 7.0-099
diff --git a/src/gui.c b/src/gui.c
index 02a14b9..b8236c6 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3734,6 +3734,12 @@
     if (dont_scroll || input_available())
 	return;
 #endif
+#ifdef FEAT_INS_EXPAND
+    /* Disallow scrolling the current window when the completion popup menu is
+     * visible. */
+    if ((sb->wp == NULL || sb->wp == curwin) && pum_visible())
+	return;
+#endif
 
 #ifdef FEAT_RIGHTLEFT
     if (sb->wp == NULL && curwin->w_p_rl)
@@ -4208,6 +4214,12 @@
 	updateWindow(wp);   /* update window, status line, and cmdline */
     }
 
+#ifdef FEAT_INS_EXPAND
+    /* May need to redraw the popup menu. */
+    if (pum_visible())
+	pum_redraw();
+#endif
+
     return (wp == curwin && !equalpos(curwin->w_cursor, old_cursor));
 }