diff options
author | sumneko <sumneko@hotmail.com> | 2022-01-23 21:35:58 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2022-01-23 21:35:58 +0800 |
commit | a1e3bd8acc16563950fd7a90f42d68aefe7ab8b0 (patch) | |
tree | 5a86d4164c58261bc84ff2413c51508d6b774e49 /script/workspace | |
parent | 7fc0bde24d7ba080988b5bba6faf227376191ddc (diff) | |
download | lua-language-server-a1e3bd8acc16563950fd7a90f42d68aefe7ab8b0.zip |
add read count first
Diffstat (limited to 'script/workspace')
-rw-r--r-- | script/workspace/loading.lua | 8 |
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 |