summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-28 18:58:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-28 18:58:10 +0800
commit3c1a0b84d9f6739d0c3194f5c53aa514bf2423de (patch)
tree7f101310a7a2e914b530a77908be4ede11abfd73
parent09ab8d03594f337be5ad527d2a9c2776ad5d5325 (diff)
downloadlua-language-server-3c1a0b84d9f6739d0c3194f5c53aa514bf2423de.zip
improve
-rw-r--r--script/core/searcher.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index 8962cfa7..0346ac94 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -651,7 +651,10 @@ function m.searchRefsByID(status, uri, expect, mode)
local tid = id .. (field or '')
footprint(status, ('checkGlobal:%s + %s'):format(id, field, tid))
local crossed = {}
- if mode == 'def' or mode == 'alldef' or mode == 'field' then
+ if mode == 'def'
+ or mode == 'alldef'
+ or mode == 'field'
+ or field then
for _, guri in collector.each('def:' .. id) do
if files.eq(uri, guri) then
goto CONTINUE