anchor.diff:      replacementText ??= "";
       if (textToReplace.length > 0) {
         TextareaSelection selInfo = _textareaDomService.getCurrentSelectionInfo();
  +
         note.text = getUpdatedText();
         saveAndUpdateState(selInfo.start);
       }
     }
   
     void saveAndUpdateState(int cursorPos) {
  -    trackCursorPosition(cursorPos);
       note.save();
       _undoList.add(note.text);
     }
  
positive.code:     selector: 'replace-dialog',
      templateUrl: 'replace_component.html',
      providers: const [TextProcessingService, TextareaDomService])
  class ReplaceDialogComponent {
  
    @Input()
    bool showDialog = false;
  
negative.code:   List<String> _undoList = new List<String>();
  
    int insertPos = -1;
  
    ReplaceDialogComponent(this._textProcessingService,
        this._textareaDomService);
  