diff --git a/platform/diff-impl/src/com/intellij/diff/util/DiffDividerDrawUtil.java b/platform/diff-impl/src/com/intellij/diff/util/DiffDividerDrawUtil.java index df381c067ab6..1ec8502f8b05 100644 --- a/platform/diff-impl/src/com/intellij/diff/util/DiffDividerDrawUtil.java +++ b/platform/diff-impl/src/com/intellij/diff/util/DiffDividerDrawUtil.java @@ -198,6 +198,7 @@ public class DiffDividerDrawUtil { @NotNull private static LineRange getVisibleInterval(Editor editor) { Rectangle area = editor.getScrollingModel().getVisibleArea(); + if (area.height < 0) return new LineRange(0, 0); LogicalPosition position1 = editor.xyToLogicalPosition(new Point(0, area.y)); LogicalPosition position2 = editor.xyToLogicalPosition(new Point(0, area.y + area.height)); return new LineRange(position1.line, position2.line);