IDEA-100518 Goto popups: prefer items with exactly typed prefix

This commit is contained in:
peter
2013-02-07 19:35:46 +01:00
parent 44917ca45f
commit 39aeb36862
@@ -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;