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:
15
src/option.c
15
src/option.c
@@ -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".
|
||||
|
Reference in New Issue
Block a user