From 1d00a0473b6f69297dd05b39d8bc8886a14fc4c5 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Thu, 28 Nov 2013 21:41:12 +0100 Subject: [PATCH] don't use smart search for files (don't use space as a separator) (cherry picked from commit 4a50f96) --- .../com/intellij/ide/actions/SearchEverywhereAction.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywhereAction.java b/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywhereAction.java index 61a36ba1dc43..d0b068321607 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywhereAction.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/SearchEverywhereAction.java @@ -1189,7 +1189,7 @@ public class SearchEverywhereAction extends AnAction implements CustomComponentA }); } - private void buildFiles(String pattern) { + private void buildFiles(final String pattern) { int filesCounter = 0; if (myFiles == null) { myFiles = myFileModel.getNames(showAll.get()); @@ -1208,7 +1208,9 @@ public class SearchEverywhereAction extends AnAction implements CustomComponentA } else if (o instanceof PsiDirectory) { file = ((PsiDirectory)o).getVirtualFile(); } - if (file != null && (showAll.get() || scope.accept(file))) { + if (file != null + && !(pattern.indexOf(' ') != -1 && file.getName().indexOf(' ') == -1) + && (showAll.get() || scope.accept(file))) { elements.add(o); } return elements.size() < 30;