Mercurial > vim
diff src/option.c @ 12865:ebb4f6c93598 v8.0.1309
patch 8.0.1309: cannot use 'balloonexpr' in a terminal
commit https://github.com/vim/vim/commit/51b0f3701ecb440aa72ab6017c1df6940c0e0f6f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 18 18:52:04 2017 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 18 Nov 2017 19:00:06 +0100 |
parents | 79a754456110 |
children | 1a450ce6980c |
line wrap: on
line diff
--- a/src/option.c +++ b/src/option.c @@ -642,6 +642,15 @@ static struct vimoption options[] = {(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 @@ 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); - } -#endif + 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)