From dbeae69d61a3085a32c07ffb4d5eb0db34e8ad73 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 7 Mar 2011 00:17:02 -0500 Subject: Do not overwrite existing completions; modules/textadept/adeptsense.lua --- modules/textadept/adeptsense.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/textadept/adeptsense.lua') diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua index 01acbed2..9f4eb334 100644 --- a/modules/textadept/adeptsense.lua +++ b/modules/textadept/adeptsense.lua @@ -415,7 +415,6 @@ end local function add_inherited(sense, class, only_fields, only_funcs, c, added) local inherited_classes = sense.inherited_classes[class] if not inherited_classes or added[class] then return end - _G.print(class, inherited_classes) local completions = sense.completions for _, inherited_class in ipairs(inherited_classes) do local inherited_completions = completions[inherited_class] @@ -663,7 +662,9 @@ function load_ctags(sense, tag_file, nolocations) -- Even though this class inherits fields and functions from others, -- an empty completions table needs to be added to it so -- get_completions() does not return prematurely. - completions[tag_name] = { fields = {}, functions = {} } + if not completions[tag_name] then + completions[tag_name] = { fields = {}, functions = {} } + end end end -- Update completions. -- cgit v1.2.3