From 9db050598e3df70063fb697dbe19cdb90295c1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 13 Dec 2019 10:40:37 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20tablefield=20=E4=BC=9A=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E6=98=BE=E7=A4=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/core/completion.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'script-beta') diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua index b69e19a6..f14ec495 100644 --- a/script-beta/core/completion.lua +++ b/script-beta/core/completion.lua @@ -285,10 +285,13 @@ local function checkTableField(ast, word, start, results) if not source then return end + local used = {} guide.eachSourceType(ast.ast, 'tablefield', function (src) local key = src.field[1] - if matchKey(word, key) + if not used[key] + and matchKey(word, key) and src ~= source then + used[key] = true results[#results+1] = { label = key, kind = ckind.Property, -- cgit v1.2.3