@Override
  public @Nullable Caret getCaretAt(@NotNull VisualPosition pos) {
    synchronized (myCarets) {
      for (CaretImpl caret : myCarets) {
        if (caret.getVisualPosition().equals(pos)) {
          return caret;
        }
      }
      return null;
    }
  }
@Override
  public @Nullable Caret getCaretAt(@NotNull VisualPosition pos)