From 62f15442152461495afcebcc0d0b048f3eacc96b 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, 2 Dec 2020 21:50:21 +0800 Subject: enable meta reference when source is meta --- script/core/reference.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'script') diff --git a/script/core/reference.lua b/script/core/reference.lua index ae07c71e..a522909f 100644 --- a/script/core/reference.lua +++ b/script/core/reference.lua @@ -69,13 +69,15 @@ return function (uri, offset) return nil end + local metaSource = vm.isMetaFile(uri) + local results = {} for _, src in ipairs(vm.getRefs(source, 5)) do local root = guide.getRoot(src) if not root then goto CONTINUE end - if vm.isMetaFile(root.uri) then + if not metaSource and vm.isMetaFile(root.uri) then goto CONTINUE end if ( src.type == 'doc.class.name' -- cgit v1.2.3