void () { String text = """ line to fold 1 line to fold 2 line to fold 3 ordinary line 1 ordinary line 2 ordinary line 3 ordinary line 4 line that is long enough to be soft wrapped ordinary line 5 ordinary line 6 ordinary line 7 ordinary line 8 """; init(30, text); LogicalPosition position = getEditor().visualToLogicalPosition(new VisualPosition(8, 0)); assertSame(7, position.line); // Position from soft-wrapped part of the line addCollapsedFoldRegion(0, text.indexOf("ordinary line 1") - 1, "..."); assertSame(7, getEditor().visualToLogicalPosition(new VisualPosition(6, 0)).line); // Check that soft wraps cache is correctly updated }