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
|
||||
}
|
||||
navigation.update()
|
||||
}
|
||||
}
|
||||
None => todo!(),
|
||||
@ -125,17 +126,19 @@ impl Form {
|
||||
let navigation = navigation.clone();
|
||||
let result = result.clone();
|
||||
let subject = subject.clone();
|
||||
move |_| match subject.borrow().as_ref() {
|
||||
Some(subject) => {
|
||||
match navigation.back(subject) {
|
||||
move |_| {
|
||||
match subject.borrow().as_ref() {
|
||||
Some(subject) => match navigation.back(subject) {
|
||||
Some((mut start, _)) => {
|
||||
result.update(navigation.position(), navigation.total());
|
||||
scroll_to_iter(&subject.text_view, &mut start)
|
||||
}
|
||||
None => todo!(), // unexpected
|
||||
}
|
||||
},
|
||||
|
||||
None => todo!(),
|
||||
}
|
||||
None => todo!(),
|
||||
navigation.update()
|
||||
}
|
||||
});
|
||||
|
||||
@ -143,15 +146,19 @@ impl Form {
|
||||
let navigation = navigation.clone();
|
||||
let result = result.clone();
|
||||
let subject = subject.clone();
|
||||
move |_| match subject.borrow().as_ref() {
|
||||
Some(subject) => match navigation.forward(subject) {
|
||||
Some((mut start, _)) => {
|
||||
result.update(navigation.position(), navigation.total());
|
||||
scroll_to_iter(&subject.text_view, &mut start)
|
||||
}
|
||||
None => todo!(), // unexpected
|
||||
},
|
||||
None => todo!(),
|
||||
move |_| {
|
||||
match subject.borrow().as_ref() {
|
||||
Some(subject) => match navigation.forward(subject) {
|
||||
Some((mut start, _)) => {
|
||||
result.update(navigation.position(), navigation.total());
|
||||
scroll_to_iter(&subject.text_view, &mut start)
|
||||
}
|
||||
None => todo!(), // unexpected
|
||||
},
|
||||
|
||||
None => todo!(),
|
||||
}
|
||||
navigation.update()
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user