Skip to content

fix(widget): request redraw when the hovered rich-text link changes - #3533

Open
trougnouf wants to merge 1 commit into
iced-rs:masterfrom
trougnouf:fix/rich-link-hover-redraw
Open

trougnouf wants to merge 1 commit into
iced-rs:masterfrom
trougnouf:fix/rich-link-hover-redraw

Conversation

@trougnouf

Copy link
Copy Markdown

Moving the cursor directly from one link to an adjacent one (e.g. two links on consecutive lines) changed hovered_link from Some(0) to Some(1), but a redraw was only requested when hover began or ended (Option::is_some changed). The previously hovered link therefore kept its underline until the cursor left the widget entirely.

Compare the full hovered_link value instead so any change in the hovered link triggers a redraw.

This fixes https://codeberg.org/trougnouf/cfait/issues/109

Moving the cursor directly from one link to an adjacent one (e.g. two
links on consecutive lines) changed `hovered_link` from Some(0) to
Some(1), but a redraw was only requested when hover began or ended
(`Option::is_some` changed). The previously hovered link therefore
kept its underline until the cursor left the widget entirely.

Compare the full `hovered_link` value instead so any change in the
hovered link triggers a redraw.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant