IDEA-184474 caret rendering artifacts when line spacing is less than 1

This commit is contained in:
Dmitry Batrak
2018-01-12 15:16:02 +03:00
parent 9ad9d9e828
commit f841d2833b
@@ -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) &&