From 801ab069341c8652680d63c174530fd4feb2911e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 25 Jun 2020 19:27:56 +0200 Subject: patch 8.2.1054: not so easy to pass a lua function to Vim Problem: Not so easy to pass a lua function to Vim. Solution: Convert a Lua function and closure to a Vim funcref. (Prabir Shrestha, closes #6246) --- runtime/doc/if_lua.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runtime') diff --git a/runtime/doc/if_lua.txt b/runtime/doc/if_lua.txt index 63e227d303..170f861ff0 100644 --- a/runtime/doc/if_lua.txt +++ b/runtime/doc/if_lua.txt @@ -333,6 +333,14 @@ Examples: :lua l = d.len -- assign d as 'self' :lua print(l()) < +Lua functions and closures are automatically converted to a Vim |Funcref| and +can be accessed in Vim scripts. Example: +> + lua <