diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2014-05-28 01:05:50 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2014-05-28 01:05:50 -0400 |
commit | 3a0af8b2f77401438e833923064ebe10df7230c7 (patch) | |
tree | e8b51bbc419b628463568235bcded404a35def55 /modules/ansi_c/init.lua | |
parent | b4406281a72c25aa2194bf05cb9d4efceb18785d (diff) |
Utilize list separator characters instead of hard-coded characters.
Diffstat (limited to 'modules/ansi_c/init.lua')
-rw-r--r-- | modules/ansi_c/init.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/ansi_c/init.lua b/modules/ansi_c/init.lua index 957fefe0..3f6daf1d 100644 --- a/modules/ansi_c/init.lua +++ b/modules/ansi_c/init.lua @@ -47,6 +47,7 @@ textadept.editing.autocompleters.ansi_c = function() end -- 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 if lfs.attributes(M.tags[i]) then for line in io.lines(M.tags[i]) do @@ -56,7 +57,8 @@ textadept.editing.autocompleters.ansi_c = function() if (fields:match('class:(%S+)') or fields:match('enum:(%S+)') or fields:match('struct:(%S+)') or fields:match('typedef:(%S+)') or '') == symbol then - list[#list + 1] = ("%s?%d"):format(name, xpms[fields:sub(1, 1)]) + local k = xpms[fields:sub(1, 1)] + list[#list + 1] = ("%s%s%d"):format(name, sep, xpms[k]) list[name] = true end end |