Changeset 1072


Ignore:
Timestamp:
Jun 20, 2011, 6:38:00 PM (6 years ago)
Author:
joerg
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sce/component/SCEDiff.java

    r1071 r1072  
    451451      int halfLines = visibleHeight / 2 / lineHeight;
    452452
    453       int lineOffset = halfLines;
    454       while (line2Pane[lineOffset] < halfLines && line2Diff[lineOffset] < halfLines) lineOffset++;
     453      int lineOffset = Math.min(halfLines, line2Pane.length);
     454      while (lineOffset < line2Pane.length && line2Pane[lineOffset] < halfLines && line2Diff[lineOffset] < halfLines) lineOffset++;
    455455      int yCorrection = lineHeight * (int) Math.max(line2Pane[lineOffset], line2Diff[lineOffset]);
    456456
Note: See TracChangeset for help on using the changeset viewer.