Use latest spans to retreive Link in rich_text
This commit is contained in:
parent
7072c696a0
commit
78c4f7e646
1 changed files with 2 additions and 2 deletions
|
|
@ -312,7 +312,7 @@ where
|
||||||
{
|
{
|
||||||
match state.paragraph.hit_span(position) {
|
match state.paragraph.hit_span(position) {
|
||||||
Some(span) if span == span_pressed => {
|
Some(span) if span == span_pressed => {
|
||||||
if let Some(link) = state
|
if let Some(link) = self
|
||||||
.spans
|
.spans
|
||||||
.get(span)
|
.get(span)
|
||||||
.and_then(|span| span.link.clone())
|
.and_then(|span| span.link.clone())
|
||||||
|
|
@ -351,7 +351,7 @@ where
|
||||||
if let Some(span) = state
|
if let Some(span) = state
|
||||||
.paragraph
|
.paragraph
|
||||||
.hit_span(position)
|
.hit_span(position)
|
||||||
.and_then(|span| state.spans.get(span))
|
.and_then(|span| self.spans.get(span))
|
||||||
{
|
{
|
||||||
if span.link.is_some() {
|
if span.link.is_some() {
|
||||||
return mouse::Interaction::Pointer;
|
return mouse::Interaction::Pointer;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue