1
0
forked from aniani/vim

patch 8.2.4180: 'balloonexpr' is evaluated in the current script context

Problem:    'balloonexpr' is evaluated in the current script context.
Solution:   Use the script context where the option was set.
This commit is contained in:
Bram Moolenaar
2022-01-22 15:09:36 +00:00
parent 9530b580a7
commit 5600a709f4
8 changed files with 36 additions and 4 deletions

View File

@@ -2614,6 +2614,21 @@ set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx)
}
}
/*
* Get the script context of global option "name".
*
*/
sctx_T *
get_option_sctx(char *name)
{
int idx = findoption((char_u *)name);
if (idx >= 0)
return &options[idx].script_ctx;
siemsg("no such option: %s", name);
return NULL;
}
/*
* Set the script_ctx for a termcap option.
* "name" must be the two character code, e.g. "RV".