diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-09-05 14:19:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-09-05 14:19:56 +0800 |
commit | f3768e21a732683c181ec17401d7ba63f68b3635 (patch) | |
tree | 19f674d9134d685a75e6fc4b0940a420c6eb0488 /server/src/method/workspace | |
parent | 2dd41281796f3a504b5b5e8192bb109e1ffaf178 (diff) | |
download | lua-language-server-f3768e21a732683c181ec17401d7ba63f68b3635.zip |
过滤掉不支持的uri
Diffstat (limited to 'server/src/method/workspace')
-rw-r--r-- | server/src/method/workspace/didChangeWatchedFiles.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/method/workspace/didChangeWatchedFiles.lua b/server/src/method/workspace/didChangeWatchedFiles.lua index dcca48f1..3ce68924 100644 --- a/server/src/method/workspace/didChangeWatchedFiles.lua +++ b/server/src/method/workspace/didChangeWatchedFiles.lua @@ -14,6 +14,9 @@ return function (lsp, params) local needReset for _, change in ipairs(params.changes) do local path = uric.decode(change.uri) + if not path then + goto CONTINUE + end if change.type == FileChangeType.Created then lsp.workspace:addFile(path) if lsp:getVM(change.uri) then @@ -32,6 +35,7 @@ return function (lsp, params) then lsp:reScanFiles() end + ::CONTINUE:: end -- 缓存过的文件发生变化后,重新计算 if needReset then |