--- old/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java 2015-04-01 18:37:57.546737900 +0300 +++ new/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java 2015-04-01 18:37:57.114183000 +0300 @@ -4741,6 +4741,12 @@ composedTextContent = null; } + if (e.getReplaceStart() >= 0) { + try { + doc.remove(e.getReplaceStart(), e.getReplaceEnd() - e.getReplaceStart()); + } catch (BadLocationException e1) {} + } + if (text != null) { text.first(); int committedTextStartIndex = 0;