@Override
  public void beforeDocumentChangeAtCaret() {
    CaretModel caretModel = editor.getCaretModel();
    VisualPosition visualCaretPosition = caretModel.getVisualPosition();
    if (!isInsideSoftWrap(visualCaretPosition)) {
      return;
    }

    SoftWrap softWrap = storage.getSoftWrap(caretModel.getOffset());
    if (softWrap == null) {
      return;
    }

    editor.getDocument().replaceString(softWrap.getStart(), softWrap.getEnd(), softWrap.getText());
    caretModel.moveToVisualPosition(visualCaretPosition);
  }
@Override
  public void beforeDocumentChangeAtCaret()