IDEA-89059 Selected item is scrolled off the bottom of the code completion popup

This commit is contained in:
peter
2012-07-19 19:09:01 +02:00
parent b58295e640
commit 1a22c5e19c
2 changed files with 8 additions and 3 deletions
@@ -356,7 +356,7 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
}
justShown = true;
}
myLookup.refreshUi(true, false);
myLookup.refreshUi(true, justShown);
hideAutopopupIfMeaningless();
if (justShown) {
myLookup.ensureSelectionVisible();
@@ -472,6 +472,9 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable
updateListHeight(listModel);
myList.setSelectedIndex(toSelect);
if (onExplicitAction && myShown) {
myList.ensureIndexIsVisible(toSelect);
}
return !oldModel.equals(items);
}
@@ -1301,8 +1304,10 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable
public void run() {
if (!myDisposed) {
myAdComponent.addAdvertisement(text);
requestResize();
refreshUi(false, false);
if (myShown) {
requestResize();
refreshUi(false, false);
}
}
}
});