From 4b444113489aae83d31f97b41161822efd0b16f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 19 May 2021 20:13:17 +0800 Subject: update --- script/core/searcher.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'script/core/searcher.lua') diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 47fadf98..f2f2bd18 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -64,8 +64,7 @@ function m.pushResult(status, mode, source) results[#results+1] = source end end - if parent.type == 'return' - or parent.type == 'callargs' then + if parent.type == 'return' then if noder.getID(source) ~= status.id then results[#results+1] = source end @@ -88,6 +87,10 @@ function m.pushResult(status, mode, source) or source.type == 'tablefield' or source.type == 'function' or source.type == 'table' + or source.type == 'string' + or source.type == 'boolean' + or source.type == 'number' + or source.type == 'nil' or source.type == 'doc.class.name' or source.type == 'doc.type.name' or source.type == 'doc.alias.name' @@ -359,9 +362,10 @@ function m.searchRefsByID(status, uri, expect, mode) return end status.crossedGlobal[firstID] = true + local tid = id .. (field or '') for guri in files.eachFile() do if not files.eq(uri, guri) then - crossSearch(status, guri, id, mode) + crossSearch(status, guri, tid, mode) end end end -- cgit v1.2.3