fix Tab/Enter in lookups when there are items whose lookup string is equal to the prefix

This commit is contained in:
peter
2010-10-29 18:01:26 +04:00
parent 698ee3f653
commit 9bc1279bd7
@@ -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 {