summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-25 17:52:23 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-25 17:52:23 +0800
commit4418abe11364b4ebf7dc205bb27811b8c7197b88 (patch)
treee7d9073ead18af381614ee8d97ed4a4a4bab13ba /server/src
parentcc144bbfcced9ac9b4ecc8ebdc345cdb42886ded (diff)
downloadlua-language-server-4418abe11364b4ebf7dc205bb27811b8c7197b88.zip
要判一下
Diffstat (limited to 'server/src')
-rw-r--r--server/src/service.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index a7d97614..886eef10 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -193,6 +193,9 @@ 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