diff options
author | 2020-03-26 17:37:08 -0400 | |
---|---|---|
committer | 2020-03-26 17:37:08 -0400 | |
commit | 940732342827ebe0d3bb98740419f621f9c77391 (patch) | |
tree | 32a3a6ac703429ca036e73c5215bac4f87b0818f /modules/lua/init.lua | |
parent | 52b0ec63792b3023b4ab42e42d2ce1e1fcb813bc (diff) | |
download | textadept-940732342827ebe0d3bb98740419f621f9c77391.tar.gz textadept-940732342827ebe0d3bb98740419f621f9c77391.zip |
Switched to 1-based indices for buffer positions, lines, and countable entities.
Diffstat (limited to 'modules/lua/init.lua')
-rw-r--r-- | modules/lua/init.lua | 2 |
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 |