void () { // The main idea is to type on a logical line before soft wrap in order to ensure that its offset is correctly shifted back. String text = "line1<caret>\n" + "second line that is long enough to be soft wrapped"; init(15, text); IntSet offsetsBefore = collectSoftWrapStartOffsets(1); assertTrue(!offsetsBefore.isEmpty()); type('2'); final IntSet offsetsAfter = collectSoftWrapStartOffsets(1); assertSame(offsetsBefore.size(), offsetsAfter.size()); offsetsBefore.forEach(value -> { assertTrue(offsetsAfter.contains(value + 1)); }); }