Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions rich/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down