summaryrefslogtreecommitdiff
path: root/script/files.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-12-01 16:51:44 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-12-01 16:51:44 +0800
commit75352f3809bfb34056c682e057d301a1f8b38309 (patch)
tree1203b29ea66cfc4d36a70e47ed3e3d6efbe6049c /script/files.lua
parentfb9dc04fc284843c021c4dc912a0a1b01cb0b6a9 (diff)
downloadlua-language-server-75352f3809bfb34056c682e057d301a1f8b38309.zip
fix #837
Diffstat (limited to 'script/files.lua')
-rw-r--r--script/files.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/files.lua b/script/files.lua
index 9ae58dfe..074a262e 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -177,6 +177,7 @@ function m.setText(uri, text, isTrust, version)
local encoding = config.get 'Lua.runtime.fileEncoding'
text = encoder.decode(encoding, text)
end
+ file.version = version
if file.originText == text then
return
end
@@ -189,7 +190,6 @@ function m.setText(uri, text, isTrust, version)
m.astMap[uri] = nil
file.cache = {}
file.cacheActiveTime = math.huge
- file.version = version
m.globalVersion = m.globalVersion + 1
await.close('files.version')
m.onWatch('version')