summaryrefslogtreecommitdiff
path: root/javax/swing/text/GapContent.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/swing/text/GapContent.java')
-rw-r--r--javax/swing/text/GapContent.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/javax/swing/text/GapContent.java b/javax/swing/text/GapContent.java
index 28d1d6ee0..bad7c0a01 100644
--- a/javax/swing/text/GapContent.java
+++ b/javax/swing/text/GapContent.java
@@ -642,6 +642,14 @@ public class GapContent
if (addItems != null)
{
System.arraycopy(addItems, 0, buffer, gapStart, addSize);
+
+ // Position objects having their mark at the end of the gap
+ // (results in an offset equal to gapStart) should be moved down
+ // because the size of the gap will decrease by addSize and the
+ // offsets will increase by the same amount and the latter should
+ // not happen.
+ setPositionsInRange(gapEnd, 0, gapStart);
+
gapStart += addSize;
}
}