diff src/optionstr.c @ 26759:31c23760d590 v8.2.3908

patch 8.2.3908: cannot use a script-local function for 'foldtext' Commit: https://github.com/vim/vim/commit/27708e6c7b6f444fd599f3dc5015336b002b874d Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sun Dec 26 21:54:43 2021 +0000 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 https://github.com/vim/vim/issues/9411)
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 Dec 2021 23:00:04 +0100
parents c2c40cefc17b
children bce848ec8b1b
line wrap: on
line diff
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -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;