0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4173: cannot use an import in 'foldexpr'

Problem:    Cannot use an import in 'foldexpr'.
Solution:   Set the script context to where 'foldexpr' was set. (closes #9584)
            Fix that the script context was not set for all buffers.
This commit is contained in:
Bram Moolenaar
2022-01-21 16:31:11 +00:00
parent 6517f14165
commit e70dd11ef4
7 changed files with 59 additions and 9 deletions

View File

@@ -2604,7 +2604,13 @@ set_option_sctx_idx(int opt_idx, int opt_flags, sctx_T script_ctx)
if (indir & PV_BUF)
curbuf->b_p_script_ctx[indir & PV_MASK] = new_script_ctx;
else if (indir & PV_WIN)
{
curwin->w_p_script_ctx[indir & PV_MASK] = new_script_ctx;
if (both)
// also setting the "all buffers" value
curwin->w_allbuf_opt.wo_script_ctx[indir & PV_MASK] =
new_script_ctx;
}
}
}