diff options
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 |