Fixed display of identifier lists after a left paren
This commit is contained in:
parent
35b890e657
commit
6a7827a296
|
|
@ -58,8 +58,10 @@ local function showCompletionList(r)
|
||||||
end
|
end
|
||||||
table.sort(completions, function(a, b) return string.upper(a) < string.upper(b) 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)
|
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
|
if buffer.char_at[buffer.current_pos - 1] == string.byte('.')
|
||||||
print(charactersEntered)
|
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_show(charactersEntered, table.concat(completions, " "))
|
||||||
--buffer.auto_c_fill_ups = "(.["
|
--buffer.auto_c_fill_ups = "(.["
|
||||||
buffer.auto_c_choose_single = setting
|
buffer.auto_c_choose_single = setting
|
||||||
|
|
@ -121,7 +123,6 @@ function M.autocomplete(ch)
|
||||||
p:close()
|
p:close()
|
||||||
local tmpFile = io.open(fileName, "r")
|
local tmpFile = io.open(fileName, "r")
|
||||||
local r = tmpFile:read("*a")
|
local r = tmpFile:read("*a")
|
||||||
print(r)
|
|
||||||
if r ~= "\n" then
|
if r ~= "\n" then
|
||||||
if r:match("^identifiers.*") then
|
if r:match("^identifiers.*") then
|
||||||
showCompletionList(r)
|
showCompletionList(r)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue