diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2020-03-26 17:37:08 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2020-03-26 17:37:08 -0400 |
commit | 940732342827ebe0d3bb98740419f621f9c77391 (patch) | |
tree | 32a3a6ac703429ca036e73c5215bac4f87b0818f /modules/ansi_c | |
parent | 52b0ec63792b3023b4ab42e42d2ce1e1fcb813bc (diff) |
Switched to 1-based indices for buffer positions, lines, and countable entities.
Diffstat (limited to 'modules/ansi_c')
-rw-r--r-- | modules/ansi_c/init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/ansi_c/init.lua b/modules/ansi_c/init.lua index e4be3710..688b81c3 100644 --- a/modules/ansi_c/init.lua +++ b/modules/ansi_c/init.lua @@ -41,7 +41,7 @@ textadept.editing.autocompleters.ansi_c = function() -- Attempt to identify the symbol type. if symbol ~= '' then local decl = '([%w_]+)[%s%*&]+' .. symbol:gsub('%p', '%%%0') .. '[^%w_]' - 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 class = buffer:get_line(i):match(decl) if class then symbol = class break end end |