From 820e61496e4479ef6d82c2ca973cb5cf141b70c8 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 27 Sep 2023 09:09:26 +0200 Subject: cache the file snippet content --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index b3f06c6..76fc24f 100644 --- a/init.lua +++ b/init.lua @@ -14,6 +14,7 @@ vis:command_register('snippet', function(argv, _, win, _, _) if not file then return end local content = file:read("*a") file:close() + M.snippets[snippet] = content win.file:insert(pos, content) else win.file:insert(pos, M.snippets[snippet]) -- cgit v1.2.3