@Override
  public void caretPositionChanged(@NotNull CaretEvent event) {
    Caret caret = event.getCaret();
    if (caret != null && myEditor.getCaretModel().getCaretCount() == 1) {
      int offset = caret.getOffset();
      FindResult occurrenceAtCaret = getOccurrenceAtCaret();
      if (occurrenceAtCaret != null && occurrenceAtCaret != myCursor) {
        moveCursorTo(occurrenceAtCaret, false, false);
        myEditor.getCaretModel().moveToOffset(offset);
        if (myFindModel.isGlobal()) {
          myEditor.getSelectionModel().removeSelection();
        }
        notifyCursorMoved();
      }
    }
  }
@Override
  public void caretPositionChanged(@NotNull CaretEvent event)