From 39aeb36862973eef10e9559255abec52b7a2e173 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 7 Feb 2013 19:25:13 +0100 Subject: [PATCH] IDEA-100518 Goto popups: prefer items with exactly typed prefix --- .../src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java index 1f9fd4330205..f7df9ebdf6b6 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/ChooseByNameBase.java @@ -1038,7 +1038,7 @@ public abstract class ChooseByNameBase { int match = shortName != null && matcher instanceof MinusculeMatcher ? ((MinusculeMatcher)matcher).matchingDegree(shortName) : Integer.MIN_VALUE; int stats = StatisticsManager.getInstance().getUseCount(new StatisticsInfo(statContext, text)); - if (stats > best || stats == best && match > bestMatch) { + if (match > bestMatch || match == bestMatch && stats > best) { best = stats; bestPosition = i; bestMatch = match;