summaryrefslogtreecommitdiff
path: root/src/gui_w32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-09 13:50:16 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-09 13:50:16 +0200
commitbe0a2597ae0d9eb0b8a8a2fc9ae1784faa929844 (patch)
tree29c80c119b12d1004fd287f0b63525a931ec59cd /src/gui_w32.c
parent06bd824869b1cb7a85e64ec94135a35698be5b7f (diff)
downloadvim-git-be0a2597ae0d9eb0b8a8a2fc9ae1784faa929844.tar.gz
patch 8.1.1303: not possible to hide a balloonv8.1.1303
Problem: Not possible to hide a balloon. Solution: Hide the balloon when balloon_show() is called with an empty string or list. Add balloon_gettext().
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r--src/gui_w32.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 69212ebb7..8d2814880 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -8506,6 +8506,15 @@ gui_mch_post_balloon(BalloonEval *beval, char_u *mesg)
{
POINT pt;
+ vim_free(beval->msg);
+ beval->msg = mesg == NULL ? NULL : vim_strsave(mesg);
+ if (beval->msg == NULL)
+ {
+ delete_tooltip(beval);
+ beval->showState = ShS_NEUTRAL;
+ return;
+ }
+
// TRACE0("gui_mch_post_balloon {{{");
if (beval->showState == ShS_SHOWING)
return;