summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2022-01-23 21:35:58 +0800
committersumneko <sumneko@hotmail.com>2022-01-23 21:35:58 +0800
commita1e3bd8acc16563950fd7a90f42d68aefe7ab8b0 (patch)
tree5a86d4164c58261bc84ff2413c51508d6b774e49 /script/workspace
parent7fc0bde24d7ba080988b5bba6faf227376191ddc (diff)
downloadlua-language-server-a1e3bd8acc16563950fd7a90f42d68aefe7ab8b0.zip
add read count first
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/loading.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/script/workspace/loading.lua b/script/workspace/loading.lua
index 41aa3537..0ef94320 100644
--- a/script/workspace/loading.lua
+++ b/script/workspace/loading.lua
@@ -84,12 +84,12 @@ function mt:loadFile(uri, libraryUri)
log.info(('Skip loaded file: %s'):format(uri))
else
local content = pub.awaitTask('loadFile', furi.decode(uri))
+ self.read = self.read + 1
+ self:update()
if self._cache[uri] then
return
end
self._cache[uri] = true
- self.read = self.read + 1
- self:update()
if not content then
return
end
@@ -113,12 +113,12 @@ function mt:loadFile(uri, libraryUri)
log.info(('Skip loaded file: %s'):format(uri))
else
local content = pub.awaitTask('loadFile', furi.decode(uri))
+ self.read = self.read + 1
+ self:update()
if self._cache[uri] then
return
end
self._cache[uri] = true
- self.read = self.read + 1
- self:update()
if not content then
return
end