void () { initText(StringUtil.repeat("a ", 1000)); ((EditorEx)getEditor()).setPrefixTextAndAttributes(">", new TextAttributes()); runWriteCommand(() -> getEditor().getDocument().deleteString(0, getEditor().getDocument().getTextLength())); assertEquals(1, ((EditorImpl)getEditor()).getVisibleLineCount()); }