summaryrefslogtreecommitdiff
path: root/runtime/doc/fold.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-03 18:04:35 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-03 18:04:35 +0100
commitf269eabc6c4f5bdcef989cd5b4b95ba8ccaa4d8a (patch)
treeb302076deeeab8b9884a2912b364f8131ef34949 /runtime/doc/fold.txt
parenteb47d6d20a47707d810360fd1684b21f67d5dec8 (diff)
downloadvim-git-f269eabc6c4f5bdcef989cd5b4b95ba8ccaa4d8a.tar.gz
Update runtime files
Diffstat (limited to 'runtime/doc/fold.txt')
-rw-r--r--runtime/doc/fold.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt
index f11ca0812..7c702ff2d 100644
--- a/runtime/doc/fold.txt
+++ b/runtime/doc/fold.txt
@@ -1,4 +1,4 @@
-*fold.txt* For Vim version 9.0. Last change: 2022 Jan 22
+*fold.txt* For Vim version 9.0. Last change: 2022 Oct 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -503,7 +503,7 @@ is evaluated to obtain the text displayed for a closed fold. Example: >
This shows the first line of the fold, with "/*", "*/" and "{{{" removed.
Note the use of backslashes to avoid some characters to be interpreted by the
-":set" command. It's simpler to define a function and call that: >
+":set" command. It is much simpler to define a function and call it: >
:set foldtext=MyFoldText()
:function MyFoldText()
@@ -512,6 +512,9 @@ Note the use of backslashes to avoid some characters to be interpreted by the
: return v:folddashes .. sub
:endfunction
+The advantage of using a function call without arguments is that it is faster,
+see |expr-option-function|.
+
Evaluating 'foldtext' is done in the |sandbox|. The current window is set to
the window that displays the line. The context is set to the script where the
option was last set.