]> granicus.if.org Git - vim/commitdiff
patch 8.1.1654: GUI: screen updates from 'balloonexpr' are not displayed v8.1.1654
authorBram Moolenaar <Bram@vim.org>
Mon, 8 Jul 2019 20:23:33 +0000 (22:23 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 8 Jul 2019 20:23:33 +0000 (22:23 +0200)
Problem:    GUI: screen updates from 'balloonexpr' are not displayed.
Solution:   Update the screen if needed.  Also avoid the cursor being
            displayed in the wrong position.

src/beval.c
src/version.c

index 68df2be9eacb12b11c4d84825692f60d6266425d..ef307c5246fb2cb1c574a1261e664f552bdab1cf 100644 (file)
@@ -294,11 +294,17 @@ general_beval_cb(BalloonEval *beval, int state UNUSED)
 
            set_vim_var_string(VV_BEVAL_TEXT, NULL, -1);
            if (result != NULL && result[0] != NUL)
-           {
                post_balloon(beval, result, NULL);
-               recursive = FALSE;
-               return;
-           }
+
+# ifdef FEAT_GUI
+           // The 'balloonexpr' evaluation may show something on the screen
+           // that requires a screen update.
+           if (gui.in_use && must_redraw)
+               redraw_after_callback(FALSE);
+# endif
+
+           recursive = FALSE;
+           return;
        }
     }
 #endif
index 03361ca2fa36055219ee2da120b50a3f151ff1d4..d35560adc583fdd631524923577e35ba8448d9b8 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1654,
 /**/
     1653,
 /**/