From 9bc1279bd7004e37b23ea4d7b0c22a7ff228339e Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 29 Oct 2010 18:01:26 +0400 Subject: [PATCH] fix Tab/Enter in lookups when there are items whose lookup string is equal to the prefix --- .../src/com/intellij/codeInsight/lookup/impl/LookupImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java index 3b331276e013..b5373826bbf4 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/lookup/impl/LookupImpl.java @@ -316,7 +316,7 @@ public class LookupImpl extends LightweightHint implements Lookup, Disposable { if (hasItems) { myList.setFixedCellWidth(Math.max(myLookupTextWidth + myCellRenderer.getIconIndent(), myAdComponent.getPreferredSize().width)); - if (isFocused() && !hasExactPrefixes) { + if (isFocused() && (!hasExactPrefixes || mySelectionTouched)) { restoreSelection(oldSelected, hasPreselectedItem, oldInvariant); } else {