From 83bfd94d1df5eecb8e4069a227c7d24598636d63 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 31 Mar 2023 13:05:22 +0100 Subject: refactor(loader): cache hash information Whenever we run fs_stat() on a path, save this information in the loader so it can be re-used. - Loader.loadfile: Remove arguments `hash` as it is no longer needed. - Loader.loader: Use _G.loadstring instead of Loader.load This allows plugins to wrap loadstring to inspection and profiling - factor out read file logic --- runtime/doc/lua.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 33833fa83e..14f2ba2b04 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2065,7 +2065,7 @@ find({modname}, {opts}) *vim.loader.find()* for `modname="*"` reset({path}) *vim.loader.reset()* - Resets the topmods cache for the path, or all the paths if path is nil. + Resets the cache for the path, or all the paths if path is nil. Parameters: ~ • {path} string? path to reset -- cgit