diff --git a/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java b/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java index fb6b0543fa5f..1d2b397c1440 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywherePsiRenderer.java @@ -105,6 +105,7 @@ public class SearchEverywherePsiRenderer extends PsiElementListCellRenderer FileUtil.toSystemDependentName(root.getPath())) + .filter(root -> basePath != null && FileUtil.isAncestor(basePath, root, true)) .orElse(null); text = rootPath != null ? ObjectUtils.notNull(FileUtil.getRelativePath(rootPath, text, File.separatorChar), text)