summaryrefslogtreecommitdiff
path: root/script-beta/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-09 19:55:26 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-09 19:55:26 +0800
commit9e193c1d17d64137191c5aa9e4f39c18a795396f (patch)
treea9a56b53f43f2c44f3a7b92fde3034e926da17ac /script-beta/core
parenta07c958b56aaa48ce2d9ad7b764df596692bedfb (diff)
downloadlua-language-server-9e193c1d17d64137191c5aa9e4f39c18a795396f.zip
转成数字再比较
Diffstat (limited to 'script-beta/core')
-rw-r--r--script-beta/core/hover/table.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script-beta/core/hover/table.lua b/script-beta/core/hover/table.lua
index c6d93d03..71f90b97 100644
--- a/script-beta/core/hover/table.lua
+++ b/script-beta/core/hover/table.lua
@@ -89,7 +89,7 @@ local function buildAsConst(classes, literals)
keys[#keys+1] = k
end
table.sort(keys, function (a, b)
- return literals[a][1] < literals[b][1]
+ return tonumber(literals[a][1]) < tonumber(literals[b][1])
end)
local lines = {}
lines[#lines+1] = '{'