From 02091b6ed1f46fe4e8e0d3286abb0fc9cd6dda94 Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Thu, 19 Jan 2017 21:08:01 +0300 Subject: [PATCH] IDEA-166059 Corrupted zero latency typing with the new hidpi - preserve caret consistency --- .../src/com/intellij/openapi/editor/impl/ImmediatePainter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ab0e021d8a14..a26447f60b1a 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 @@ -167,7 +167,8 @@ class ImmediatePainter { fillRect(graphics, rectangle2, attributes2.getBackgroundColor()); drawChar(graphics, c2, p2x, p2y + ascent, font2, attributes2.getForegroundColor()); - fillRect(graphics, caretRectangle, getCaretColor(editor)); + graphics.setColor(getCaretColor(editor)); + graphics.fillRect(caretRectangle.x, caretRectangle.y, caretRectangle.width, caretRectangle.height); fillRect(graphics, rectangle1, attributes1.getBackgroundColor()); drawChar(graphics, c1, p2x - width1, p2y + ascent, font1, attributes1.getForegroundColor());