diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-12 13:54:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-12 13:54:28 +0800 |
commit | 2048a535657992ff5573c692541cf10b9146f3bd (patch) | |
tree | 9672d3a61b56ff2475b3abfd7490fb3328b5e30f /server/src/core | |
parent | 3e71bf6a712cc008e95caa2a3c38aa41b700d95d (diff) | |
download | lua-language-server-2048a535657992ff5573c692541cf10b9146f3bd.zip |
修正bug
Diffstat (limited to 'server/src/core')
-rw-r--r-- | server/src/core/completion.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua index f5444e67..eab35ea0 100644 --- a/server/src/core/completion.lua +++ b/server/src/core/completion.lua @@ -338,6 +338,9 @@ local function searchInRequire(vm, select, source, callback) return end local list = vm.lsp.workspace:matchPath(vm.uri, source[1]) + if not list then + return + end for _, str in ipairs(list) do callback(str, nil, CompletionItemKind.File, { textEdit = { @@ -420,6 +423,9 @@ local function searchAllWords(vm, source, word, callback) if word == '' then return end + if source.type == 'string' then + return + end for _, src in ipairs(vm.sources) do if src.type == 'name' and matchKey(word, src[1]) |