summaryrefslogtreecommitdiffstats
path: root/runtime/doc/print.txt
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2021-12-26 10:51:39 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-26 10:51:39 +0000
commit8bb65f230d3025037f34021a72616038da0601ee (patch)
tree1edaf57b7fbe5e3c30a174026f5389f8b98b7376 /runtime/doc/print.txt
parentec86520f946a40d5c4a92d6a11d6928faa13abd4 (diff)
patch 8.2.3900: it is not easy to use a script-local function for an optionv8.2.3900
Problem: It is not easy to use a script-local function for an option. Solution: recognize s: and <SID> at the start of the expression. (Yegappan Lakshmanan, closes #9401)
Diffstat (limited to 'runtime/doc/print.txt')
-rw-r--r--runtime/doc/print.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt
index aaa004c93e..eebdf7ea02 100644
--- a/runtime/doc/print.txt
+++ b/runtime/doc/print.txt
@@ -174,6 +174,11 @@ an error message. In that case Vim will delete the file. In the default
value for non-MS-Windows a trick is used: Adding "v:shell_error" will result
in a non-zero number when the system() call fails.
+If the expression starts with s: or |<SID>|, then it is replaced with the
+script ID (|local-function|). Example: >
+ set printexpr=s:MyPrintFile()
+ set printexpr=<SID>SomePrintFile()
+<
This option cannot be set from a |modeline| or in the |sandbox|, for security
reasons.