diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-03 08:37:10 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-12-03 08:39:57 +0800 |
commit | 5e97984188e95de419ba5a710a060f0614c6c9e0 (patch) | |
tree | be47cfc360ca4f467228d2c900fe5202bd6693a5 /runtime | |
parent | 9671908c682dc3fc4e939f44a636457db6f3e5a4 (diff) | |
download | rneovim-5e97984188e95de419ba5a710a060f0614c6c9e0.tar.gz rneovim-5e97984188e95de419ba5a710a060f0614c6c9e0.tar.bz2 rneovim-5e97984188e95de419ba5a710a060f0614c6c9e0.zip |
vim-patch:partial: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 vim/vim#9411)
https://github.com/vim/vim/commit/27708e6c7b6f444fd599f3dc5015336b002b874d
Only port the changes actually related to 'foldtext'.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/fold.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index 04c5b70c45..fa823608df 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -117,7 +117,7 @@ Try to avoid the "=", "a" and "s" return values, since Vim often has to search 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() < @@ -526,6 +526,11 @@ The resulting line is truncated to fit in the window, it never wraps. 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| |