From 3a6c86efc3da3ef4abaf1ad41b5f10f79b6abaeb Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Sat, 28 Sep 2024 20:30:53 +0100 Subject: [PATCH] simplify --- rich/segment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rich/segment.py b/rich/segment.py index aa2394cae..86c8c9a9c 100644 --- a/rich/segment.py +++ b/rich/segment.py @@ -129,7 +129,7 @@ def _split_cells(cls, segment: "Segment", cut: int) -> Tuple["Segment", "Segment cell_size = get_character_cell_size - pos = int((cut / cell_length) * (len(text) - 1)) - 1 + pos = int((cut / cell_length) * (len(text))) - 1 if pos < 0: pos = 0