From f2ae07bdf03492462f4619bb4e7ae238da7f8a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 25 Dec 2018 15:15:36 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/matcher/completion.lua | 3 +++ 1 file changed, 3 insertions(+) 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 = { -- cgit v1.2.3