mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
fix search navigation update
This commit is contained in:
parent
8004f51c70
commit
bc47a2730e
1 changed files with 21 additions and 14 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue