From 7a047d8dc2dff4078649290696b3e507aaaf8f04 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 Aug 2020 22:38:15 -0400 Subject: vim-patch:8.2.1347: cannot easily get the script ID Problem: Cannot easily get the script ID. Solution: Support expand(''). https://github.com/vim/vim/commit/909443028b57d7514ce3c71f00e9d808f2126b4f --- 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 a2b7aca4fd..1514f03c55 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1078,6 +1078,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