Index: javax/swing/text/GapContent.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/text/GapContent.java,v retrieving revision 1.18 diff -u -r1.18 GapContent.java --- javax/swing/text/GapContent.java 2 Aug 2005 14:25:09 -0000 1.18 +++ javax/swing/text/GapContent.java 2 Aug 2005 14:36:53 -0000 @@ -424,7 +424,7 @@ gapEnd)); int index2 = Collections.binarySearch(positions, new GapContentPosition( newGapEnd)); - if (index1 > 0 || index2 > 0) + if (index1 > 0 && index2 > 0) { int i1 = Math.min(index1, index2); int i2 = Math.max(index1, index2);