summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-27 10:49:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-27 10:49:13 +0800
commit409b85f6f50cecbbdeca37cb471ae8279991051e (patch)
tree5e494446298a4b71afb90de5f17582718653e056 /server
parentd5c9154ad08cd9f0bf05d014eadaf934d73434b1 (diff)
downloadlua-language-server-409b85f6f50cecbbdeca37cb471ae8279991051e.zip
不知道为什么这里计数会计错,先改成这样
Diffstat (limited to 'server')
-rw-r--r--server/src/vm/multi.lua3
-rw-r--r--server/src/vm/value.lua2
2 files changed, 1 insertions, 4 deletions
diff --git a/server/src/vm/multi.lua b/server/src/vm/multi.lua
index 5079468e..809b5244 100644
--- a/server/src/vm/multi.lua
+++ b/server/src/vm/multi.lua
@@ -21,9 +21,6 @@ function mt:push(value, isLast)
end
function mt:get(index)
- if index > self.len then
- self.len = index
- end
return self[index]
end
diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua
index f0525b14..e0837d53 100644
--- a/server/src/vm/value.lua
+++ b/server/src/vm/value.lua
@@ -359,9 +359,9 @@ function mt:eachInfo(callback)
list[#list+1] = info
else
self._info[srcId] = nil
- self._infoCount = self._infoCount - 1
end
end
+ self._infoCount = #list
table.sort(list, function (a, b)
return a._sort < b._sort
end)