diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/ImmediatePainter.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/ImmediatePainter.java index 75dd72f26865..ae6e465457a6 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/ImmediatePainter.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/ImmediatePainter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. + * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. */ package com.intellij.openapi.editor.impl; @@ -82,9 +82,10 @@ class ImmediatePainter { final Caret caret = caretModel.getPrimaryCaret(); final Document document = editor.getDocument(); - return !(editor.getComponent().getParent() instanceof EditorTextField) && - document instanceof DocumentImpl && + return document instanceof DocumentImpl && editor.getHighlighter() instanceof LexerEditorHighlighter && + !(editor.getComponent().getParent() instanceof EditorTextField) && + editor.myView.getTopOverhang() <= 0 && editor.myView.getBottomOverhang() <= 0 && !editor.getSelectionModel().hasSelection() && caretModel.getCaretCount() == 1 && !isInVirtualSpace(editor, caret) &&