From 98f41bc39646de6d16c70fc745ac57f3c2eb719f Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Wed, 18 Jul 2012 14:16:53 +0400 Subject: [PATCH] Revert "EditorGutterComponentImpl: fix calculation of the space needed for foldings" This reverts commit 82efc5150796d27bb471ed702522bd441d9685a2. This was not a misprint. Actually, this place is reserved for change markers. If folding outline is shown, the place will be reserved when painting the outline, otherwise we need to reserve the place here. --- .../openapi/editor/impl/EditorGutterComponentImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java index fa55c3e41e28..49abd5d0652e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java @@ -295,7 +295,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse doPaintFoldingTree((Graphics2D)g, clip, firstVisibleOffset, lastVisibleOffset); } else { - UIUtil.drawVDottedLine((Graphics2D)g, clip.x + clip.width - 1, clip.y, clip.y + clip.height, null, getOutlineColor(false)); + UIUtil.drawVDottedLine((Graphics2D)g, clip.x + clip.width -1, clip.y, clip.y + clip.height, null, getOutlineColor(false)); } } @@ -561,7 +561,8 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse }); myLineMarkerAreaWidth = myIconsAreaWidth + FREE_PAINTERS_AREA_WIDTH + - (isFoldingOutlineShown() ? getFoldingAnchorWidth() / 2 : 0); + // if folding outline is shown, there will be enough place for change markers, otherwise add place for it. + (isFoldingOutlineShown() ? 0 : getFoldingAnchorWidth() / 2); } private void paintGutterRenderers(final Graphics g, int firstVisibleOffset, int lastVisibleOffset) {