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.
diff --git a/src/fold.c b/src/fold.c
index f314d7a..2a45d21 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -3307,7 +3307,7 @@
// 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)