Method: rich.text.Span.move
Calls: 1, Exceptions: 0, Paths: 1Back
Path 1: 1 calls (1.0)
2 (1)
Span (1)
1def move(self, offset: int) -> "Span":
2 """Move start and end by a given offset.
3
4 Args:
5 offset (int): Number of characters to add to start and end.
6
7 Returns:
8 TextSpan: A new TextSpan with adjusted position.
9 """
10 start, end, style = self
11 return Span(start + offset, end + offset, style)