void () { initText(""); // Cannot set up text with singular surrogate characters directly runWriteCommand(() -> getEditor().getDocument().setText(HIGH_SURROGATE + LOW_SURROGATE + LOW_SURROGATE)); addFoldRegion(2, 3, "..."); runWriteCommand(() -> ((DocumentEx)getEditor().getDocument()).moveText(2, 3, 1)); FoldRegion[] foldRegions = getEditor().getFoldingModel().getAllFoldRegions(); assertFalse(foldRegions.length > 0 && DocumentUtil.isInsideSurrogatePair(getEditor().getDocument(), foldRegions[0].getStartOffset())); }