mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
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.
5600a709f4
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -1913,6 +1913,18 @@ bool parse_winhl_opt(win_T *wp)
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Get the script context of global option "name".
|
||||
sctx_T *get_option_sctx(const char *const name)
|
||||
{
|
||||
int idx = findoption(name);
|
||||
|
||||
if (idx >= 0) {
|
||||
return &options[idx].last_set.script_ctx;
|
||||
}
|
||||
siemsg("no such option: %s", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/// Set the script_ctx for an option, taking care of setting the buffer- or
|
||||
/// window-local value.
|
||||
void set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx)
|
||||
|
Reference in New Issue
Block a user