Skip to content

Commit

Permalink
fix ansi
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jan 2, 2025
1 parent 3ac04f3 commit ccd54fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/textual/_styles_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def render_widget(self, widget: Widget, crop: Region) -> list[Strip]:
and hover_style._meta
and "@click" in hover_style.meta
):
1 / 0
link_style_hover = widget.link_style_hover
if link_style_hover:
strips = [
Expand Down
2 changes: 1 addition & 1 deletion src/textual/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def blend(
"""
if destination.auto:
destination = self.get_contrast_text(destination.a)
if destination.ansi is not None or self.ansi:
if destination.ansi is not None:
return destination
if factor <= 0:
return self
Expand Down
2 changes: 2 additions & 0 deletions src/textual/visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def __rich_repr__(self) -> rich.repr.Result:
yield "underline", self.underline, None
yield "reverse", self.reverse, None
yield "strike", self.strike, None
yield "link", self.link, None

if self._meta is not None:
yield "meta", self.meta
Expand Down Expand Up @@ -175,6 +176,7 @@ def from_rich_style(
underline=rich_style.underline,
reverse=rich_style.reverse,
strike=rich_style.strike,
link=rich_style.link,
_meta=rich_style._meta,
)

Expand Down

0 comments on commit ccd54fd

Please sign in to comment.