vim-patch:8.2.4173: cannot use an import in 'foldexpr' (#25215)

Problem:    Cannot use an import in 'foldexpr'.
Solution:   Set the script context to where 'foldexpr' was set. (closes vim/vim#9584)
            Fix that the script context was not set for all buffers.

e70dd11ef4

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-09-17 21:01:19 +08:00
committed by GitHub
parent 71530cc972
commit 211edceb4f
3 changed files with 10 additions and 3 deletions

View File

@@ -1241,6 +1241,8 @@ struct window_S {
// this window, w_allbuf_opt is for all buffers in this window.
winopt_T w_onebuf_opt;
winopt_T w_allbuf_opt;
// transform a pointer to a "onebuf" option into a "allbuf" option
#define GLOBAL_WO(p) ((char *)(p) + sizeof(winopt_T))
// A few options have local flags for P_INSECURE.
uint32_t w_p_stl_flags; // flags for 'statusline'
@@ -1256,9 +1258,6 @@ struct window_S {
int w_briopt_list; // additional indent for lists
int w_briopt_vcol; // indent for specific column
// transform a pointer to a "onebuf" option into a "allbuf" option
#define GLOBAL_WO(p) ((char *)(p) + sizeof(winopt_T))
long w_scbind_pos;
ScopeDictDictItem w_winvar; ///< Variable for "w:" dictionary.