diff src/netbeans.c @ 12871:1a450ce6980c v8.0.1312

patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI commit https://github.com/vim/vim/commit/c3719bd87beca9f72d2e9f11e36d561c2c3b57b0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 18 22:13:31 2017 +0100 patch 8.0.1312: balloon_show() only works in terminal when compiled with GUI Problem: balloon_show() only works in terminal when compiled with the GUI. Solution: Add FEAT_BEVAL_GUI and refactor to move common code out of the GUI specific file.
author Christian Brabandt <cb@256bit.org>
date Sat, 18 Nov 2017 22:15:05 +0100
parents 3ca08bf99396
children 808625d4b71b
line wrap: on
line diff
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -107,7 +107,7 @@ netbeans_close(void)
 	nb_channel = NULL;
     }
 
-#ifdef FEAT_BEVAL
+#ifdef FEAT_BEVAL_GUI
     bevalServers &= ~BEVAL_NETBEANS;
 #endif
 
@@ -220,7 +220,7 @@ netbeans_connect(char *params, int doabo
 	if (nb_channel != NULL)
 	{
 	    /* success */
-# ifdef FEAT_BEVAL
+# ifdef FEAT_BEVAL_GUI
 	    bevalServers |= BEVAL_NETBEANS;
 # endif
 
@@ -1788,7 +1788,7 @@ nb_do_cmd(
 	}
 	else if (streq((char *)cmd, "showBalloon"))
 	{
-#if defined(FEAT_BEVAL)
+#if defined(FEAT_BEVAL_GUI)
 	    static char	*text = NULL;
 
 	    /*
@@ -2506,7 +2506,7 @@ netbeans_beval_cb(
 
     /* Don't do anything when 'ballooneval' is off, messages scrolled the
      * windows up or we have no connection. */
-    if (!p_beval || msg_scrolled > 0 || !NETBEANS_OPEN)
+    if (!can_use_beval() || !NETBEANS_OPEN)
 	return;
 
     if (get_beval_info(beval, TRUE, &wp, &lnum, &text, &col) == OK)