comparison src/option.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 53edd190a607
children 9e0ac05f579a
comparison
equal deleted inserted replaced
27288:685e831a281a 27289:e11682ba8c80
2602 if (both || (opt_flags & OPT_LOCAL)) 2602 if (both || (opt_flags & OPT_LOCAL))
2603 { 2603 {
2604 if (indir & PV_BUF) 2604 if (indir & PV_BUF)
2605 curbuf->b_p_script_ctx[indir & PV_MASK] = new_script_ctx; 2605 curbuf->b_p_script_ctx[indir & PV_MASK] = new_script_ctx;
2606 else if (indir & PV_WIN) 2606 else if (indir & PV_WIN)
2607 {
2607 curwin->w_p_script_ctx[indir & PV_MASK] = new_script_ctx; 2608 curwin->w_p_script_ctx[indir & PV_MASK] = new_script_ctx;
2609 if (both)
2610 // also setting the "all buffers" value
2611 curwin->w_allbuf_opt.wo_script_ctx[indir & PV_MASK] =
2612 new_script_ctx;
2613 }
2608 } 2614 }
2609 } 2615 }
2610 2616
2611 /* 2617 /*
2612 * Set the script_ctx for a termcap option. 2618 * Set the script_ctx for a termcap option.