void () { String text = """ 1 /** * comment */ class Test { }"""; init(100, text); String placeholder = "/**...*/"; addCollapsedFoldRegion(2, text.indexOf("class") - 1, placeholder); getEditor().getCaretModel().moveToOffset(0); delete(); assertEquals(new VisualPosition(1, placeholder.length()), getEditor().offsetToVisualPosition(text.indexOf("class") - 2)); }