@Override
    @RequiresEdt
    public void caretPositionChanged(@NotNull CaretEvent event) {
      if (isInsideBulkUpdate()) {
        return;
      }

      final Caret changedCaret = event.getCaret();
      final Caret currentPrimaryCaret = editor.getCaretModel().getPrimaryCaret();

      if (changedCaret != currentPrimaryCaret) {
        // Filter out changes of secondary carets
        return;
      }

      primaryCaretPositionPossiblyChanged(currentPrimaryCaret);
    }
@Override
    @RequiresEdt
    public void caretPositionChanged(@NotNull CaretEvent event)