summaryrefslogtreecommitdiffstats
path: root/runtime/doc/fold.txt
diff options
context:
space:
mode:
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 f11ca0812d..7c702ff2d4 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.