summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/service.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index 0eb62121..a7d97614 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -193,11 +193,9 @@ function mt:readText(uri, path, buf)
end
function mt:removeText(uri)
+ self:saveText(uri, -1, '')
+ self:compileVM(uri)
self._file[uri] = nil
- -- 删除文件后,清除该文件的诊断
- self:clearDiagnostics(uri)
- -- 清除全局变量
- self._global:clearGlobal(uri)
end
function mt:reCompile()