@RequiresEdt
  public boolean isAtBidiRunBoundary(@NotNull VisualPosition visualPosition) {
    int offset = visualPositionToOffset(visualPosition);
    int otherSideOffset = visualPositionToOffset(visualPosition.leanRight(!visualPosition.leansRight));
    return offset != otherSideOffset;
  }
@RequiresEdt
  public boolean isAtBidiRunBoundary(@NotNull VisualPosition visualPosition)