mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-09-14 16:02:05 +00:00
fix search navigation update
This commit is contained in:
parent
8004f51c70
commit
bc47a2730e
@ -90,6 +90,7 @@ impl Form {
|
|||||||
}
|
}
|
||||||
None => todo!(), // unexpected
|
None => todo!(), // unexpected
|
||||||
}
|
}
|
||||||
|
navigation.update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => todo!(),
|
None => todo!(),
|
||||||
@ -125,17 +126,19 @@ impl Form {
|
|||||||
let navigation = navigation.clone();
|
let navigation = navigation.clone();
|
||||||
let result = result.clone();
|
let result = result.clone();
|
||||||
let subject = subject.clone();
|
let subject = subject.clone();
|
||||||
move |_| match subject.borrow().as_ref() {
|
move |_| {
|
||||||
Some(subject) => {
|
match subject.borrow().as_ref() {
|
||||||
match navigation.back(subject) {
|
Some(subject) => match navigation.back(subject) {
|
||||||
Some((mut start, _)) => {
|
Some((mut start, _)) => {
|
||||||
result.update(navigation.position(), navigation.total());
|
result.update(navigation.position(), navigation.total());
|
||||||
scroll_to_iter(&subject.text_view, &mut start)
|
scroll_to_iter(&subject.text_view, &mut start)
|
||||||
}
|
}
|
||||||
None => todo!(), // unexpected
|
None => todo!(), // unexpected
|
||||||
}
|
},
|
||||||
|
|
||||||
|
None => todo!(),
|
||||||
}
|
}
|
||||||
None => todo!(),
|
navigation.update()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -143,15 +146,19 @@ impl Form {
|
|||||||
let navigation = navigation.clone();
|
let navigation = navigation.clone();
|
||||||
let result = result.clone();
|
let result = result.clone();
|
||||||
let subject = subject.clone();
|
let subject = subject.clone();
|
||||||
move |_| match subject.borrow().as_ref() {
|
move |_| {
|
||||||
Some(subject) => match navigation.forward(subject) {
|
match subject.borrow().as_ref() {
|
||||||
Some((mut start, _)) => {
|
Some(subject) => match navigation.forward(subject) {
|
||||||
result.update(navigation.position(), navigation.total());
|
Some((mut start, _)) => {
|
||||||
scroll_to_iter(&subject.text_view, &mut start)
|
result.update(navigation.position(), navigation.total());
|
||||||
}
|
scroll_to_iter(&subject.text_view, &mut start)
|
||||||
None => todo!(), // unexpected
|
}
|
||||||
},
|
None => todo!(), // unexpected
|
||||||
None => todo!(),
|
},
|
||||||
|
|
||||||
|
None => todo!(),
|
||||||
|
}
|
||||||
|
navigation.update()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user