Index: javax/swing/text/GapContent.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/text/GapContent.java,v retrieving revision 1.22 diff -u -r1.22 GapContent.java --- javax/swing/text/GapContent.java 25 Aug 2005 19:19:19 -0000 1.22 +++ javax/swing/text/GapContent.java 7 Sep 2005 17:50:18 -0000 @@ -114,7 +114,7 @@ */ public int getOffset() { - if (mark <= gapStart) + if (mark <= gapStart || mark <= gapEnd) return mark; else return mark - (gapEnd - gapStart); @@ -372,7 +372,7 @@ if (index < 0) index = -(index + 1); positions.add(index, pos); - + return pos; }