patch 8.1.1654: GUI: screen updates from 'balloonexpr' are not displayed
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.
diff --git a/src/beval.c b/src/beval.c
index 68df2be..ef307c5 100644
--- a/src/beval.c
+++ b/src/beval.c
@@ -294,11 +294,17 @@
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