summaryrefslogtreecommitdiff
path: root/script/core/searcher.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-17 21:45:26 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-17 21:45:26 +0800
commit35866009a76991fbf9f110d3ec6071b27b8bc706 (patch)
treec35ffc1b09fbec1aeee068f57bbffc85ad98bb92 /script/core/searcher.lua
parentddb86f9c712bd371f4ee129ecf068ba197e74fc4 (diff)
downloadlua-language-server-35866009a76991fbf9f110d3ec6071b27b8bc706.zip
some fix
Diffstat (limited to 'script/core/searcher.lua')
-rw-r--r--script/core/searcher.lua15
1 files changed, 9 insertions, 6 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index dd4e4730..74e57736 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -369,6 +369,9 @@ function m.searchRefsByID(status, uri, expect, mode)
searchID(newID)
end
+ local ftag = {}
+ local btag = {}
+
local function checkThenPushTag(ward, tag)
if not tag then
return true
@@ -376,11 +379,11 @@ function m.searchRefsByID(status, uri, expect, mode)
local checkTags
local pushTags
if ward == 'forward' then
- checkTags = status.btag
- pushTags = status.ftag
+ checkTags = btag
+ pushTags = ftag
else
- checkTags = status.ftag
- pushTags = status.btag
+ checkTags = ftag
+ pushTags = btag
end
if checkTags[tag] and checkTags[tag] > 0 then
return false
@@ -395,9 +398,9 @@ function m.searchRefsByID(status, uri, expect, mode)
end
local popTags
if ward == 'forward' then
- popTags = status.ftag
+ popTags = ftag
else
- popTags = status.btag
+ popTags = btag
end
popTags[tag] = popTags[tag] - 1
end