1
0
forked from aniani/vim

patch 8.2.3908: cannot use a script-local function for 'foldtext'

Problem:    Cannot use a script-local function for 'foldtext'.
Solution:   Expand "s:" and "<SID>". (Yegappan Lakshmanan, closes #9411)
This commit is contained in:
Yegappan Lakshmanan
2021-12-26 21:54:43 +00:00
committed by Bram Moolenaar
parent c553a21e18
commit 27708e6c7b
9 changed files with 60 additions and 4 deletions

View File

@@ -2310,6 +2310,7 @@ ambw_end:
# endif
# ifdef FEAT_FOLDING
varp == &curwin->w_p_fde ||
varp == &curwin->w_p_fdt ||
# endif
gvarp == &p_fex ||
# ifdef FEAT_FIND_ID
@@ -2341,8 +2342,10 @@ ambw_end:
p_opt = &p_dex;
# endif
# ifdef FEAT_FOLDING
if(varp == &curwin->w_p_fde) // 'foldexpr'
if (varp == &curwin->w_p_fde) // 'foldexpr'
p_opt = &curwin->w_p_fde;
if (varp == &curwin->w_p_fdt) // 'foldtext'
p_opt = &curwin->w_p_fdt;
# endif
if (gvarp == &p_fex) // 'formatexpr'
p_opt = &curbuf->b_p_fex;