patch 8.2.3900: it is not easy to use a script-local function for an option
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
ec86520f94
commit
8bb65f230d
@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user