void () { initText("<caret>abc"); addCollapsedFoldRegion(1, 2, ""); right(); Caret caret = getEditor().getCaretModel().getPrimaryCaret(); assertEquals(2, caret.getOffset()); assertEquals(new LogicalPosition(0, 2), caret.getLogicalPosition()); assertEquals(new VisualPosition(0, 1), caret.getVisualPosition()); right(); assertEquals(3, caret.getOffset()); assertEquals(new LogicalPosition(0, 3), caret.getLogicalPosition()); assertEquals(new VisualPosition(0, 2), caret.getVisualPosition()); }