void () { final String text = "text 1234"; init(7, text); final int offset = text.indexOf("123"); checkSoftWraps(offset); final CaretModel caretModel = getEditor().getCaretModel(); caretModel.moveToOffset(offset); caretModel.moveCaretRelatively(-1, 0, false, false, false); assertEquals(offset, caretModel.getOffset()); // Navigating from 'after soft wrap' to the 'before soft wrap' position. delete(); assertEquals("text 234", getEditor().getDocument().getText()); }