Skip to content

Commit ccd54fd

Browse files
committed
fix ansi
1 parent 3ac04f3 commit ccd54fd

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/textual/_styles_cache.py

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def render_widget(self, widget: Widget, crop: Region) -> list[Strip]:
152152
and hover_style._meta
153153
and "@click" in hover_style.meta
154154
):
155+
1 / 0
155156
link_style_hover = widget.link_style_hover
156157
if link_style_hover:
157158
strips = [

src/textual/color.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ def blend(
403403
"""
404404
if destination.auto:
405405
destination = self.get_contrast_text(destination.a)
406-
if destination.ansi is not None or self.ansi:
406+
if destination.ansi is not None:
407407
return destination
408408
if factor <= 0:
409409
return self

src/textual/visual.py

+2
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def __rich_repr__(self) -> rich.repr.Result:
131131
yield "underline", self.underline, None
132132
yield "reverse", self.reverse, None
133133
yield "strike", self.strike, None
134+
yield "link", self.link, None
134135

135136
if self._meta is not None:
136137
yield "meta", self.meta
@@ -175,6 +176,7 @@ def from_rich_style(
175176
underline=rich_style.underline,
176177
reverse=rich_style.reverse,
177178
strike=rich_style.strike,
179+
link=rich_style.link,
178180
_meta=rich_style._meta,
179181
)
180182

0 commit comments

Comments
 (0)