diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-07 14:46:06 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-07 14:46:06 +0800 |
commit | 3b8c92f7b74834fd8223d32df3f012e1c8a0a1cf (patch) | |
tree | 9bcacb59bd87412441d5ade1742bc2e2f612a88b /server/src | |
parent | 717729c33ce10067aac8afddd2fc2a5da9d801b5 (diff) | |
download | lua-language-server-3b8c92f7b74834fd8223d32df3f012e1c8a0a1cf.zip |
先特殊处理一下
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/core/find_source.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/core/find_source.lua b/server/src/core/find_source.lua index cac3a263..a64a047e 100644 --- a/server/src/core/find_source.lua +++ b/server/src/core/find_source.lua @@ -39,8 +39,10 @@ local function findAtPos(vm, pos, filter) if rangeA == rangeB then if b.type == 'call' and #b == 1 and b[1] == a then return true - else + elseif a.type == 'call' and #a == 1 and a[1] == b then return false + else + return a.id < b.id end end return rangeA < rangeB |