1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2017-11-18 18:52:04 +01:00
parent 234d16286a
commit 51b0f3701e
26 changed files with 419 additions and 85 deletions

View File

@@ -640,6 +640,15 @@ static struct vimoption options[] =
#else
(char_u *)NULL, PV_NONE,
{(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,
@@ -8423,12 +8432,21 @@ set_bool_option(
#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)