diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 2155a42a4d..20d9148fd4 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -15,6 +15,7 @@ The following people have contributed to the development of Rich: - [Jim Crist-Harif](https://github.com/jcrist) - [Ed Davis](https://github.com/davised) - [Pete Davison](https://github.com/pd93) +- [Aayush Digikar](https://github.com/Ironsing) - [James Estevez](https://github.com/jstvz) - [Jonathan Eunice](https://github.com/jonathan-3play) - [Aryaz Eghbali](https://github.com/AryazE) diff --git a/rich/text.py b/rich/text.py index 7e087a4e32..558d92ad9e 100644 --- a/rich/text.py +++ b/rich/text.py @@ -69,7 +69,7 @@ def split(self, offset: int) -> Tuple["Span", Optional["Span"]]: return self, None start, end, style = self - span1 = Span(start, min(end, offset), style) + span1 = Span(start, offset, style) span2 = Span(span1.end, end, style) return span1, span2 @@ -97,7 +97,7 @@ def right_crop(self, offset: int) -> "Span": start, end, style = self if offset >= end: return self - return Span(start, min(offset, end), style) + return Span(start, offset, style) def extend(self, cells: int) -> "Span": """Extend the span by the given number of cells.