IDEA-87677 End space for exact match doesn't work with middle matching in goto popups

This commit is contained in:
Alexander Kirillin
2012-07-13 22:36:37 +04:00
parent 0a79216446
commit 598e0e19c3
@@ -54,7 +54,7 @@ public class DefaultChooseByNameItemProvider implements ChooseByNameItemProvider
String modifiedNamePattern = null;
if (base.isSearchInAnyPlace() && !namePattern.trim().isEmpty()) {
modifiedNamePattern = "*" + namePattern + "*";
modifiedNamePattern = "*" + namePattern + (namePattern.endsWith(" ") ? "" : "*");
}
boolean empty = namePattern.isEmpty() || namePattern.equals("@"); // TODO[yole]: remove implicit dependency