Skip to content

Commit

Permalink
避免 indexing 时查询 index
Browse files Browse the repository at this point in the history
  • Loading branch information
tangzx committed Dec 31, 2023
1 parent d670210 commit 96f245d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>): VirtualFile? {
val context = SearchContext.get(project)
if (context.forStub)
return null;

var perfect: VirtualFile? = null
val names = shortUrl.split('/')
val fileName = names.lastOrNull()
Expand Down

0 comments on commit 96f245d

Please sign in to comment.