diff options
Diffstat (limited to 'script/core/reference.lua')
-rw-r--r-- | script/core/reference.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/script/core/reference.lua b/script/core/reference.lua index 7620b09e..efeb28b6 100644 --- a/script/core/reference.lua +++ b/script/core/reference.lua @@ -1,4 +1,5 @@ -local guide = require 'core.guide' +local searcher = require 'core.searcher' +local guide = require 'parser.guide' local files = require 'files' local vm = require 'vm' local findSource = require 'core.find-source' @@ -6,8 +7,8 @@ local findSource = require 'core.find-source' local function sortResults(results) -- 先按照顺序排序 table.sort(results, function (a, b) - local u1 = guide.getUri(a.target) - local u2 = guide.getUri(b.target) + local u1 = searcher.getUri(a.target) + local u2 = searcher.getUri(b.target) if u1 == u2 then return a.target.start < b.target.start else @@ -19,7 +20,7 @@ local function sortResults(results) for i = #results, 1, -1 do local res = results[i].target local f = res.finish - local uri = guide.getUri(res) + local uri = searcher.getUri(res) if lf and f > lf and uri == lu then table.remove(results, i) else |