void () { // Inspired by IDEA-78616 - the point is to recalculate soft wraps when tab width is changed. String text = "\t<caret> my text"; // Build soft wraps cache. init(40, text); VisualPosition caretPositionBefore = getEditor().getCaretModel().getVisualPosition(); // Change tab size. final CommonCodeStyleSettings.IndentOptions indentOptions = getCurrentCodeStyleSettings().getIndentOptions(PlainTextFileType.INSTANCE); assertNotNull(indentOptions); indentOptions.TAB_SIZE++; ((EditorImpl)getEditor()).reinitSettings(); assertEquals( new VisualPosition(caretPositionBefore.line, caretPositionBefore.column + 1), getEditor().getCaretModel().getVisualPosition() ); }