aboutsummaryrefslogtreecommitdiff
path: root/modules/lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lua')
-rw-r--r--modules/lua/init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/lua/init.lua b/modules/lua/init.lua
index b9cf16bf..7a06b302 100644
--- a/modules/lua/init.lua
+++ b/modules/lua/init.lua
@@ -70,7 +70,7 @@ textadept.editing.autocompleters.lua = function()
symbol, part = symbol:gsub('^_G%.?', ''), part ~= '_G' and part or ''
-- Attempt to identify string type and file type symbols.
local assignment = '%f[%w_]' .. symbol:gsub('(%p)', '%%%1') .. '%s*=%s*(.*)$'
- for i = buffer:line_from_position(buffer.current_pos) - 1, 0, -1 do
+ for i = buffer:line_from_position(buffer.current_pos) - 1, 1, -1 do
local expr = buffer:get_line(i):match(assignment)
if expr then
for patt, type in pairs(M.expr_types) do