summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-01 15:09:39 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-01 15:09:39 +0800
commitb5c53c92555069c07b19618987c4d4d80226cf3e (patch)
tree6a0346b8a4b3a261da3b81be282f47a5979fd8b7 /script
parent8abe15deac954ee0c1c0a155c2490289dfd37b04 (diff)
downloadlua-language-server-b5c53c92555069c07b19618987c4d4d80226cf3e.zip
cleanup
Diffstat (limited to 'script')
-rw-r--r--script/workspace/workspace.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index 5ffcac5c..660ef879 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -221,8 +221,6 @@ local function loadFileFactory(root, progressData, isLibrary)
progressData.max = progressData.max + 1
progressData:update()
pub.task('loadFile', uri, function (text)
- progressData.read = progressData.read + 1
- progressData:update()
if text then
log.info(('Preload file at: %s , size = %.3f KB'):format(uri, #text / 1000.0))
if isLibrary then
@@ -233,11 +231,11 @@ local function loadFileFactory(root, progressData, isLibrary)
else
files.remove(uri)
end
+ progressData.read = progressData.read + 1
+ progressData:update()
end)
end
if files.isDll(uri) then
- progressData.max = progressData.max + 1
- progressData:update()
pub.task('loadFile', uri, function (content)
progressData.read = progressData.read + 1
progressData:update()
@@ -248,6 +246,8 @@ local function loadFileFactory(root, progressData, isLibrary)
end
files.saveDll(uri, content)
end
+ progressData.max = progressData.max + 1
+ progressData:update()
end)
end
await.delay()