From 93b2a0384da629c9ce94955cd88e490b6f12dc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 9 Aug 2021 11:31:02 +0800 Subject: `FIX` completion: may not find results --- script/core/searcher.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'script/core') diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 6ea15d97..8f5af96b 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -361,8 +361,8 @@ local uriMapMT = {__index = function (self, uri) end} function m.searchRefsByID(status, suri, expect, mode) - local ast = files.getState(suri) - if not ast then + local state = files.getState(suri) + if not state then return end local searchStep @@ -380,6 +380,8 @@ function m.searchRefsByID(status, suri, expect, mode) local elockMap = setmetatable({}, uriMapMT) local ecallMap = setmetatable({}, uriMapMT) + compileAllNodes(state.ast) + local function lockExpanding(elock, ecall, id, field) if not field then field = '' -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0