IDEA-124891 Implementation icon in gutter overlaps preview for Icon class rubymine/138.328
authorVassiliy <vassiliy.kudryashov@jetbrains.com>
Sat, 24 May 2014 06:10:39 +0000 (10:10 +0400)
committerVassiliy <vassiliy.kudryashov@jetbrains.com>
Mon, 26 May 2014 11:56:43 +0000 (15:56 +0400)
Get rid of icons from collapsed areas

platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java

index 82fc96461d6dd68ed319cdc015d8963b871fd022..f600c606a98d50c088fd1a6e6236fb3821077f55 100644 (file)
@@ -584,6 +584,9 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
         if (renderer == null) {
           return;
         }
+        if (myEditor.getFoldingModel().isOffsetCollapsed(highlighter.getStartOffset())) {
+          return;
+        }
         VisualPosition visualPosition = myEditor.offsetToVisualPosition(highlighter.getStartOffset());
         int line = EditorUtil.calcSurroundingRange(myEditor, visualPosition, visualPosition).getFirst().line;
         List<GutterMark> renderers = myLineToGutterRenderers.get(line);