]> granicus.if.org Git - vim/commitdiff
patch 8.1.1596: when resizing the screen may draw popup in wrong position v8.1.1596
authorBram Moolenaar <Bram@vim.org>
Tue, 25 Jun 2019 23:03:53 +0000 (01:03 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 25 Jun 2019 23:03:53 +0000 (01:03 +0200)
Problem:    When resizing the screen may draw popup in wrong position. (Masato
            Nishihata)
Solution:   Check the popup is not outside of the screen. (fixes #4592)

src/popupwin.c
src/version.c

index aa8bba088f6aa70d7cae8e7500cf91ccda11c07d..b9526c7ff9491e8075a23b12bf2f53396cc1079f 100644 (file)
@@ -2154,8 +2154,9 @@ update_popups(void (*win_update)(win_T *wp))
        wp->w_winrow += top_off;
        wp->w_wincol += left_off;
 
-       // Draw the popup text.
-       win_update(wp);
+       // Draw the popup text, unless it's off screen.
+       if (wp->w_winrow < screen_Rows && wp->w_wincol < screen_Columns)
+           win_update(wp);
 
        wp->w_winrow -= top_off;
        wp->w_wincol -= left_off;
index 0631f09b2291dcfd9b716444b2779be810638b67..fa4e50dea3e13bca4750ba62e7d621e902b2ffec 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1596,
 /**/
     1595,
 /**/