From 2350ee1bf9913dbe155986cea2f70123af7591fd Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 4 Oct 2013 21:31:56 +0200 Subject: [PATCH] fix tests --- .../codeInsight/lookup/impl/LookupImpl.java | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) 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 e0e6126ac5c4..c7e216142979 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 @@ -876,16 +876,19 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable } }); - Disposer.register(this, new UiNotifyConnector(myEditor.getContentComponent(), new Activatable() { - @Override - public void showNotify() { - } - - @Override - public void hideNotify() { - hideLookup(false); - } - })); + JComponent editorComponent = myEditor.getContentComponent(); + if (editorComponent.isShowing()) { + Disposer.register(this, new UiNotifyConnector(editorComponent, new Activatable() { + @Override + public void showNotify() { + } + + @Override + public void hideNotify() { + hideLookup(false); + } + })); + } myList.addListSelectionListener(new ListSelectionListener() { private LookupElement oldItem = null;