From 96f245d95fd5f8971a504e1839e81fdbc31b8f07 Mon Sep 17 00:00:00 2001 From: tangzx Date: Sun, 31 Dec 2023 21:39:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=20indexing=20=E6=97=B6?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=20index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/tang/intellij/lua/ext/LuaFileFuzzyResolver.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/tang/intellij/lua/ext/LuaFileFuzzyResolver.kt b/src/main/java/com/tang/intellij/lua/ext/LuaFileFuzzyResolver.kt index e4123a973..61b06d47b 100644 --- a/src/main/java/com/tang/intellij/lua/ext/LuaFileFuzzyResolver.kt +++ b/src/main/java/com/tang/intellij/lua/ext/LuaFileFuzzyResolver.kt @@ -21,9 +21,14 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.search.FilenameIndex import com.intellij.psi.search.ProjectAndLibrariesScope +import com.tang.intellij.lua.search.SearchContext class LuaFileFuzzyResolver : ILuaFileResolver { override fun find(project: Project, shortUrl: String, extNames: Array): VirtualFile? { + val context = SearchContext.get(project) + if (context.forStub) + return null; + var perfect: VirtualFile? = null val names = shortUrl.split('/') val fileName = names.lastOrNull()