void () { EditorSettingsExternalizable settings = EditorSettingsExternalizable.getInstance(); settings.setStripTrailingSpaces(EditorSettingsExternalizable.STRIP_TRAILING_SPACES_CHANGED); Editor editor1 = createHeavyEditor("x1.txt", "x11 <caret>\nyyy\n"); Editor editor2 = createHeavyEditor("x2.txt", "x22 <caret>\nyyy\n"); type(' ', editor1, getProject()); type(' ', editor2, getProject()); FileDocumentManager.getInstance().saveAllDocuments(); assertEquals("x11\nyyy\n", editor1.getDocument().getText()); assertEquals("x22 \nyyy\n", editor2.getDocument().getText()); // caret in the way in second but not in the first }