0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -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

@@ -3307,7 +3307,7 @@ foldlevelExpr(fline_T *flp)
// KeyTyped may be reset to 0 when calling a function which invokes
// do_cmdline(). To make 'foldopen' work correctly restore KeyTyped.
save_keytyped = KeyTyped;
n = eval_foldexpr(flp->wp->w_p_fde, &c);
n = eval_foldexpr(flp->wp, &c);
KeyTyped = save_keytyped;
switch (c)