patch 8.0.1309: cannot use 'balloonexpr' in a terminal
Problem: Cannot use 'balloonexpr' in a terminal.
Solution: Add 'balloonevalterm' and add code to handle mouse movements in a
terminal. Initial implementation for Unix with GUI.
diff --git a/src/option.c b/src/option.c
index 4f25c1f..495a89d 100644
--- a/src/option.c
+++ b/src/option.c
@@ -642,6 +642,15 @@
{(char_u *)0L, (char_u *)0L}
#endif
SCRIPTID_INIT},
+ {"balloonevalterm", "bevalterm",P_BOOL|P_VI_DEF|P_NO_MKRC,
+#ifdef FEAT_BEVALTERM
+ (char_u *)&p_bevalterm, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L}
+#else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+#endif
+ SCRIPTID_INIT},
{"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM,
#if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
(char_u *)&p_bexpr, PV_BEXPR,
@@ -8423,12 +8432,21 @@
#ifdef FEAT_BEVAL
else if ((int *)varp == &p_beval)
{
- if (p_beval && !old_value)
- gui_mch_enable_beval_area(balloonEval);
- else if (!p_beval && old_value)
- gui_mch_disable_beval_area(balloonEval);
+ if (!balloonEvalForTerm)
+ {
+ if (p_beval && !old_value)
+ gui_mch_enable_beval_area(balloonEval);
+ else if (!p_beval && old_value)
+ gui_mch_disable_beval_area(balloonEval);
+ }
}
#endif
+# ifdef FEAT_BEVALTERM
+ else if ((int *)varp == &p_bevalterm)
+ {
+ mch_bevalterm_changed();
+ }
+# endif
#ifdef FEAT_AUTOCHDIR
else if ((int *)varp == &p_acd)