summaryrefslogtreecommitdiff
path: root/server/src/service.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-25 17:56:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-25 17:56:10 +0800
commit22c78de4cc682ff31cbf16abc3688eba35df62cb (patch)
tree9864d0576a3b6b1f03b28d15ba5bbe7a8de4fbaa /server/src/service.lua
parente9192c353b4901a49bd20280c15a7c881ff7c6be (diff)
parent4418abe11364b4ebf7dc205bb27811b8c7197b88 (diff)
downloadlua-language-server-22c78de4cc682ff31cbf16abc3688eba35df62cb.zip
Merge branch 'master' into global
Diffstat (limited to 'server/src/service.lua')
-rw-r--r--server/src/service.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index 0eb62121..886eef10 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -193,11 +193,12 @@ function mt:readText(uri, path, buf)
end
function mt:removeText(uri)
+ if not self._file[uri] then
+ return
+ end
+ self:saveText(uri, -1, '')
+ self:compileVM(uri)
self._file[uri] = nil
- -- 删除文件后,清除该文件的诊断
- self:clearDiagnostics(uri)
- -- 清除全局变量
- self._global:clearGlobal(uri)
end
function mt:reCompile()