Skip to content

Commit 16df382

Browse files
committed
select bottom righgt
1 parent 555fa62 commit 16df382

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/textual/_compositor.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,10 +893,8 @@ def get_widget_and_offset_at(
893893
if widget not in self.visible_widgets:
894894
return None, None
895895

896-
# if y >= widget.content_region.bottom:
897-
# # If y is below the content region, default to the offset on the next line
898-
# # y = widget.content_region.bottom
899-
# return widget, Offset(x - region.x, widget.content_region.bottom)
896+
if y >= widget.content_region.bottom:
897+
x, y = widget.content_region.bottom_right - (1, 1)
900898

901899
x -= region.x
902900
y -= region.y

src/textual/content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,14 +1017,14 @@ def to_strip(self, style: Style) -> Strip:
10171017
content = self.content
10181018
x = self.x
10191019
y = self.y
1020-
base_rich_style = style.rich_style
10211020

10221021
if self.highlight_style is not None and self.highlight_range is not None:
10231022
start, end = self.highlight_range
10241023
content = content.stylize(self.highlight_style, start, end)
10251024

10261025
if align in ("start", "left") or (align == "justify" and self.line_end):
10271026
pad_right = width - self.content.cell_length
1027+
pad_right = 0
10281028

10291029
elif align == "center":
10301030
excess_space = width - self.content.cell_length

src/textual/widgets/_option_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ class OptionLineSpan(NamedTuple):
119119
class OptionList(ScrollView, can_focus=True):
120120
"""A vertical option list with bounce-bar highlighting."""
121121

122+
ALLOW_SELECT = False
122123
BINDINGS: ClassVar[list[BindingType]] = [
123124
Binding("down", "cursor_down", "Down", show=False),
124125
Binding("end", "last", "Last", show=False),

0 commit comments

Comments
 (0)