Mercurial > vim
diff src/fold.c @ 27289:e11682ba8c80 v8.2.4173
patch 8.2.4173: cannot use an import in 'foldexpr'
Commit: https://github.com/vim/vim/commit/e70dd11ef41f69bd5e94f630194e6b3c4f3f2102
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jan 21 16:31:11 2022 +0000
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 https://github.com/vim/vim/issues/9584)
Fix that the script context was not set for all buffers.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 21 Jan 2022 17:45:04 +0100 |
parents | c9474ae175f4 |
children | ebe56a24acb6 |
line wrap: on
line diff
--- a/src/fold.c +++ b/src/fold.c @@ -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)