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.
diff --git a/src/netbeans.c b/src/netbeans.c
index 1a86727..f4b42dc 100644
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -107,7 +107,7 @@
nb_channel = NULL;
}
-#ifdef FEAT_BEVAL
+#ifdef FEAT_BEVAL_GUI
bevalServers &= ~BEVAL_NETBEANS;
#endif
@@ -220,7 +220,7 @@
if (nb_channel != NULL)
{
/* success */
-# ifdef FEAT_BEVAL
+# ifdef FEAT_BEVAL_GUI
bevalServers |= BEVAL_NETBEANS;
# endif
@@ -1788,7 +1788,7 @@
}
else if (streq((char *)cmd, "showBalloon"))
{
-#if defined(FEAT_BEVAL)
+#if defined(FEAT_BEVAL_GUI)
static char *text = NULL;
/*
@@ -2506,7 +2506,7 @@
/* 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)