private void initRestoreInfo(int caretOffset) {
    int lineStartOffset = getLineStartOffsetByTotalOffset(myDocument, caretOffset);

    myVisualColumnToRestore = myCaretModel.getVisualPosition().column;
    myCaretIndentToRestore = myDocument.getText(TextRange.create(lineStartOffset, caretOffset));
    myBeforeCaretRangeMarker = myDocument.createRangeMarker(0, lineStartOffset);
  }
private void initRestoreInfo(int caretOffset)