Skip to content

Commit 523ca0d

Browse files
committed
fix exception on select
1 parent 5bedb5a commit 523ca0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/textual/_compositor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -918,9 +918,9 @@ def get_widget_and_offset_at(
918918
meta = style.meta
919919
if "offset" in meta:
920920
offset_x, offset_y = style.meta["offset"]
921-
offset_x2 = offset_x + segment.cell_length
921+
offset_x2 = offset_x + len(segment.text)
922922

923-
if x <= end:
923+
if x <= end and x >= start:
924924
return widget, (
925925
None
926926
if offset_y is None

0 commit comments

Comments
 (0)