diff --git a/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsLineMarkerProvider.java b/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsLineMarkerProvider.java index 98c7105b66d3..5fc7440f6b41 100644 --- a/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsLineMarkerProvider.java +++ b/java/java-impl/src/com/intellij/codeInsight/ExternalAnnotationsLineMarkerProvider.java @@ -109,10 +109,15 @@ public class ExternalAnnotationsLineMarkerProvider implements LineMarkerProvider } } if (group.getChildrenCount() > 0) { - JBPopupFactory.getInstance() - .createActionGroupPopup(null, group, SimpleDataContext.getProjectContext(null), - JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, true) - .showInBestPositionFor(editor); + editor.getScrollingModel().runActionOnScrollingFinished(new Runnable() { + @Override + public void run() { + JBPopupFactory.getInstance() + .createActionGroupPopup(null, group, SimpleDataContext.getProjectContext(null), + JBPopupFactory.ActionSelectionAid.SPEEDSEARCH, true) + .showInBestPositionFor(editor); + } + }); } } }