summaryrefslogtreecommitdiff
path: root/server/src/matcher
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-21 00:06:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-21 00:06:50 +0800
commitf8c11fb3a7cd46905f45754c47b363d822738380 (patch)
treec1b7029f172227544b4bc821ed5fadd5bf434f7e /server/src/matcher
parent30d1f825c606ddd523a1ed852edcf39da0b1ca6d (diff)
downloadlua-language-server-f8c11fb3a7cd46905f45754c47b363d822738380.zip
修正
Diffstat (limited to 'server/src/matcher')
-rw-r--r--server/src/matcher/find_result.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/matcher/find_result.lua b/server/src/matcher/find_result.lua
index f876e2b3..dcf00c66 100644
--- a/server/src/matcher/find_result.lua
+++ b/server/src/matcher/find_result.lua
@@ -9,7 +9,7 @@ local function findAtPos(results, pos)
local res = {}
for sources, object in pairs(results.sources) do
if sources.type == 'multi-source' then
- for _, source in ipairs(source) do
+ for _, source in ipairs(sources) do
if source.type ~= 'simple' and isContainPos(source, pos) then
res[#res+1] = {
object = object,
@@ -43,7 +43,7 @@ local function findClosePos(results, pos)
local parent = nil
for sources, object in pairs(results.sources) do
if sources.type == 'multi-source' then
- for _, source in ipairs(source) do
+ for _, source in ipairs(sources) do
if source.type ~= 'simple' then
local dis = pos - source.finish
if dis > 0 and dis < curDis then