void () { initText("abc\ndef\nghi\n"); configureSoftWraps(100); addCollapsedFoldRegion(0, 4, "..."); WriteCommandAction.runWriteCommandAction(getProject(), () -> ((DocumentEx)getEditor().getDocument()).moveText(0, 4, 12)); assertEquals(new LogicalPosition(2, 0), getEditor().visualToLogicalPosition(new VisualPosition(2, 1))); }