diff src/evalfunc.c @ 11014:fb2bcfa6a8de v8.0.0396

patch 8.0.0396: 'balloonexpr' only works synchronously commit https://github.com/vim/vim/commit/59716a27bd5c6c64def6c3ca430ff1246deae749 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 1 20:32:44 2017 +0100 patch 8.0.0396: 'balloonexpr' only works synchronously Problem: 'balloonexpr' only works synchronously. Solution: Add balloon_show(). (Jusufadis Bakamovic, closes https://github.com/vim/vim/issues/1449)
author Christian Brabandt <cb@256bit.org>
date Wed, 01 Mar 2017 20:45:05 +0100
parents b3601a8eb679
children 50f3e37bc210
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -58,6 +58,9 @@ static void f_asin(typval_T *argvars, ty
 static void f_atan(typval_T *argvars, typval_T *rettv);
 static void f_atan2(typval_T *argvars, typval_T *rettv);
 #endif
+#ifdef FEAT_BEVAL
+static void f_balloon_show(typval_T *argvars, typval_T *rettv);
+#endif
 static void f_browse(typval_T *argvars, typval_T *rettv);
 static void f_browsedir(typval_T *argvars, typval_T *rettv);
 static void f_bufexists(typval_T *argvars, typval_T *rettv);
@@ -484,6 +487,9 @@ static struct fst
     {"atan",		1, 1, f_atan},
     {"atan2",		2, 2, f_atan2},
 #endif
+#ifdef FEAT_BEVAL
+    {"balloon_show",	1, 1, f_balloon_show},
+#endif
     {"browse",		4, 4, f_browse},
     {"browsedir",	2, 2, f_browsedir},
     {"bufexists",	1, 1, f_bufexists},
@@ -1363,6 +1369,17 @@ f_atan2(typval_T *argvars, typval_T *ret
 #endif
 
 /*
+ * "balloon_show()" function
+ */
+#ifdef FEAT_BEVAL
+    static void
+f_balloon_show(typval_T *argvars, typval_T *rettv UNUSED)
+{
+    gui_mch_post_balloon(balloonEval, get_tv_string_chk(&argvars[0]));
+}
+#endif
+
+/*
  * "browse(save, title, initdir, default)" function
  */
     static void