From c33348a12256d6f8cff17960f037d9615c002276 Mon Sep 17 00:00:00 2001 From: sumneko Date: Sun, 28 Apr 2019 21:39:29 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=85=B3=E9=94=AE=E5=AD=97=E6=9C=89?= =?UTF-8?q?=E6=97=B6=E6=8D=95=E8=8E=B7=E4=B8=8D=E5=88=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/completion.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'server/src/core/completion.lua') diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua index 8659901f..c8147f9e 100644 --- a/server/src/core/completion.lua +++ b/server/src/core/completion.lua @@ -761,13 +761,16 @@ end local function getSource(vm, pos, text, filter) local word = findWord(pos, text) - local source = findSource(vm, pos, filter) + local source = keywordSource(vm, word, pos) + if source then + return source, pos, word + end + source = findSource(vm, pos, filter) if source then return source, pos, word end pos = findStartPos(pos, text) - source = findSource(vm, pos, filter) - or keywordSource(vm, word, pos) + source = findSource(vm, pos, filter) return source, pos, word end -- cgit v1.2.3