aboutsummaryrefslogtreecommitdiff
path: root/modules/lua/init.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2020-03-03 19:39:02 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2020-03-03 19:39:02 -0500
commitfceb1a37df623649d191c3c1a881e5b0538b1391 (patch)
tree87a34dfc2397dc4afdaa0c8ec189f037300f458e /modules/lua/init.lua
parent1618f5017abb3c9bacc9ba346bf22a936ef5dd06 (diff)
downloadtextadept-fceb1a37df623649d191c3c1a881e5b0538b1391.tar.gz
textadept-fceb1a37df623649d191c3c1a881e5b0538b1391.zip
Added test suite and API type checking for more helpful error messages.
Diffstat (limited to 'modules/lua/init.lua')
-rw-r--r--modules/lua/init.lua3
1 files changed, 1 insertions, 2 deletions
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