IDEA-166059 Corrupted zero latency typing with the new hidpi - preserve caret consistency
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Thu, 19 Jan 2017 18:08:01 +0000 (21:08 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Thu, 19 Jan 2017 18:12:01 +0000 (21:12 +0300)
platform/platform-impl/src/com/intellij/openapi/editor/impl/ImmediatePainter.java

index ab0e021d8a1485d8e8cb32fd5731270b7990676d..a26447f60b1a85fad1947506991fbfe403e6ed70 100644 (file)
@@ -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());