IDEA-124891 Implementation icon in gutter overlaps preview for Icon class
authorVassiliy <vassiliy.kudryashov@jetbrains.com>
Mon, 19 May 2014 15:15:05 +0000 (19:15 +0400)
committerVassiliy <vassiliy.kudryashov@jetbrains.com>
Mon, 19 May 2014 15:15:39 +0000 (19:15 +0400)
platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java

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