comparison 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
comparison
equal deleted inserted replaced
27288:685e831a281a 27289:e11682ba8c80
3305 flp->lvl = 0; 3305 flp->lvl = 0;
3306 3306
3307 // KeyTyped may be reset to 0 when calling a function which invokes 3307 // KeyTyped may be reset to 0 when calling a function which invokes
3308 // do_cmdline(). To make 'foldopen' work correctly restore KeyTyped. 3308 // do_cmdline(). To make 'foldopen' work correctly restore KeyTyped.
3309 save_keytyped = KeyTyped; 3309 save_keytyped = KeyTyped;
3310 n = eval_foldexpr(flp->wp->w_p_fde, &c); 3310 n = eval_foldexpr(flp->wp, &c);
3311 KeyTyped = save_keytyped; 3311 KeyTyped = save_keytyped;
3312 3312
3313 switch (c) 3313 switch (c)
3314 { 3314 {
3315 // "a1", "a2", .. : add to the fold level 3315 // "a1", "a2", .. : add to the fold level