From 6a7827a2960a9177af6cbae7fb959e76805e4b21 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Tue, 3 Sep 2013 16:55:28 -0700 Subject: [PATCH] Fixed display of identifier lists after a left paren --- editors/textadept/modules/dmd/dcd.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/editors/textadept/modules/dmd/dcd.lua b/editors/textadept/modules/dmd/dcd.lua index 77f15b9..2b62d77 100644 --- a/editors/textadept/modules/dmd/dcd.lua +++ b/editors/textadept/modules/dmd/dcd.lua @@ -58,8 +58,10 @@ local function showCompletionList(r) end table.sort(completions, function(a, b) return string.upper(a) < string.upper(b) end) local charactersEntered = buffer.current_pos - buffer:word_start_position(buffer.current_pos) - if buffer.char_at[buffer.current_pos - 1] == string.byte('.') then charactersEntered = 0 end - print(charactersEntered) + if buffer.char_at[buffer.current_pos - 1] == string.byte('.') + or buffer.char_at[buffer.current_pos - 1] == string.byte('(') then + charactersEntered = 0 + end buffer:auto_c_show(charactersEntered, table.concat(completions, " ")) --buffer.auto_c_fill_ups = "(.[" buffer.auto_c_choose_single = setting @@ -121,7 +123,6 @@ function M.autocomplete(ch) p:close() local tmpFile = io.open(fileName, "r") local r = tmpFile:read("*a") - print(r) if r ~= "\n" then if r:match("^identifiers.*") then showCompletionList(r)