diff runtime/doc/fold.txt @ 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 edb7d53fc7e3
line wrap: on
line diff
--- a/runtime/doc/fold.txt
+++ b/runtime/doc/fold.txt
@@ -122,7 +122,7 @@ Try to avoid the "=", "a" and "s" return
 backwards for a line for which the fold level is defined.  This can be slow.
 
 If the 'foldexpr' expression starts with s: or |<SID>|, then it is replaced
-with the script ID (|local-function|). Example: >
+with the script ID (|local-function|). Examples: >
 		set foldexpr=s:MyFoldExpr()
 		set foldexpr=<SID>SomeFoldExpr()
 <
@@ -529,6 +529,11 @@ The resulting line is truncated to fit i
 When there is room after the text, it is filled with the character specified
 by 'fillchars'.
 
+If the 'foldtext' expression starts with s: or |<SID>|, then it is replaced
+with the script ID (|local-function|). Examples: >
+		set foldtext=s:MyFoldText()
+		set foldtext=<SID>SomeFoldText()
+<
 Note that backslashes need to be used for characters that the ":set" command
 handles differently: Space, backslash and double-quote. |option-backslash|