From fceb1a37df623649d191c3c1a881e5b0538b1391 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 3 Mar 2020 19:39:02 -0500 Subject: Added test suite and API type checking for more helpful error messages. --- modules/lua/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/lua/init.lua') diff --git a/modules/lua/init.lua b/modules/lua/init.lua index 4c6060f0..7609dc9b 100644 --- a/modules/lua/init.lua +++ b/modules/lua/init.lua @@ -82,8 +82,7 @@ textadept.editing.autocompleters.lua = function() -- Search through ctags for completions for that symbol. local name_patt = '^'..part local sep = string.char(buffer.auto_c_type_separator) - for i = 1, #M.tags do - local file = M.tags[i] + for _, file in ipairs(M.tags) do if type(file) == 'function' then file = file() end if file and lfs.attributes(file) then for tag_line in io.lines(file) do -- cgit v1.2.3