summaryrefslogtreecommitdiff
path: root/script-beta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-02 10:43:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-02 10:43:48 +0800
commit9af004f6987221ea92f77118c18996d8d43ee672 (patch)
tree072921d375d7453b1f135c7fa4cbfbbfaa4fa4ce /script-beta
parenta22c1b083cc0336c21a0ef5c153ecd6cd36b7d6e (diff)
downloadlua-language-server-9af004f6987221ea92f77118c18996d8d43ee672.zip
修正自动完成的一个bug
Diffstat (limited to 'script-beta')
-rw-r--r--script-beta/core/completion.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua
index fcf18151..b82e462b 100644
--- a/script-beta/core/completion.lua
+++ b/script-beta/core/completion.lua
@@ -114,6 +114,10 @@ local function findParent(ast, text, offset)
end
local oop
if char == '.' then
+ -- `..` 的情况
+ if text:sub(i-1, i-1) == '.' then
+ return nil, nil
+ end
oop = false
elseif char == ':' then
oop = true