From 6f0ce380fd12ddc3a04a9c38712eb9dbb257eb8a Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Mon, 29 Jun 2015 15:20:06 +0300 Subject: [PATCH] lst: correct range painting at the end of file in default mode click area is still bugged though --- .../vcs/ex/LineStatusTrackerDrawing.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/ex/LineStatusTrackerDrawing.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/ex/LineStatusTrackerDrawing.java index 0e485f220f02..5f042f4c49ea 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/ex/LineStatusTrackerDrawing.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/ex/LineStatusTrackerDrawing.java @@ -91,23 +91,22 @@ public class LineStatusTrackerDrawing { final int x = r.x + r.width - 3; final int endX = gutter.getWhitespaceSeparatorOffset(); - if (range.getInnerRanges() == null) { // actual painter - if (r.height > 0) { - paintRect(g, gutterColor, borderColor, x, r.y, endX, r.y + r.height); + final int y = lineToY(editor, range.getLine1()); + final int endY = lineToY(editor, range.getLine2()); + + if (range.getInnerRanges() == null) { // Mode.DEFAULT + if (y != endY) { + paintRect(g, gutterColor, borderColor, x, y, endX, endY); } else { - paintTriangle(g, gutterColor, borderColor, x, endX, r.y); + paintTriangle(g, gutterColor, borderColor, x, endX, y); } } - else { // registry: diff.status.tracker.smart - if (range.getType() == Range.DELETED) { - final int y = lineToY(editor, range.getLine1()); + else { // Mode.SMART + if (y == endY) { paintTriangle(g, gutterColor, borderColor, x, endX, y); } else { - final int y = lineToY(editor, range.getLine1()); - int endY = lineToY(editor, range.getLine2()); - List innerRanges = range.getInnerRanges(); for (Range.InnerRange innerRange : innerRanges) { if (innerRange.getType() == Range.DELETED) continue;