diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-27 10:49:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-27 10:49:13 +0800 |
commit | 409b85f6f50cecbbdeca37cb471ae8279991051e (patch) | |
tree | 5e494446298a4b71afb90de5f17582718653e056 /server | |
parent | d5c9154ad08cd9f0bf05d014eadaf934d73434b1 (diff) | |
download | lua-language-server-409b85f6f50cecbbdeca37cb471ae8279991051e.zip |
不知道为什么这里计数会计错,先改成这样
Diffstat (limited to 'server')
-rw-r--r-- | server/src/vm/multi.lua | 3 | ||||
-rw-r--r-- | server/src/vm/value.lua | 2 |
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) |