From 909443028b57d7514ce3c71f00e9d808f2126b4f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 1 Aug 2020 20:45:11 +0200 Subject: patch 8.2.1347: cannot easily get the script ID Problem: Cannot easily get the script ID. Solution: Support expand(''). --- runtime/doc/map.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 0ad43d449..79c46f712 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1167,6 +1167,10 @@ When executing an autocommand or a user command, it will run in the context of the script it was defined in. This makes it possible that the command calls a local function or uses a local mapping. +In case the value is used in a context where cannot be correctly +expanded, use the expand() function: > + let &includexpr = expand('') .. 'My_includeexpr()' + Otherwise, using "" outside of a script context is an error. If you need to get the script number to use in a complicated script, you can -- cgit v1.2.1