diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/CodeCompletionHandlerBase.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/CodeCompletionHandlerBase.java index 439cf158aabb..005450276169 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/CodeCompletionHandlerBase.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/CodeCompletionHandlerBase.java @@ -164,7 +164,7 @@ public class CodeCompletionHandlerBase { Runnable runnable = new Runnable() { @Override public void run() { - EditorUtil.fillVirtualSpaceUntilCaret(editor); + EditorUtil.fillVirtualSpaceUntilCaret(InjectedLanguageUtil.getTopLevelEditor(editor)); PsiDocumentManager.getInstance(project).commitAllDocuments(); CompletionAssertions.checkEditorValid(editor);