diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-25 15:15:36 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-25 15:15:36 +0800 |
commit | f2ae07bdf03492462f4619bb4e7ae238da7f8a5b (patch) | |
tree | c3d38fe23caefbab5c3d279831922272086d58ad | |
parent | f4c3c59ab9c95581c267ee8b4775af40091efab9 (diff) | |
download | lua-language-server-f2ae07bdf03492462f4619bb4e7ae238da7f8a5b.zip |
修正报错
-rw-r--r-- | server/src/matcher/completion.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/matcher/completion.lua b/server/src/matcher/completion.lua index 8b309880..d5067ed2 100644 --- a/server/src/matcher/completion.lua +++ b/server/src/matcher/completion.lua @@ -263,6 +263,9 @@ local function findClosePos(vm, pos) end end end + if parent.type ~= 'local' and parent.type ~= 'field' then + parent = nil + end if parent then -- 造个假的 DirtyName local source = { |