mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
remove extra scopes
This commit is contained in:
parent
bc47a2730e
commit
a6aad5e3a8
1 changed files with 21 additions and 26 deletions
|
|
@ -85,12 +85,12 @@ impl Form {
|
||||||
if !this.text().is_empty() {
|
if !this.text().is_empty() {
|
||||||
match navigation.forward(subject) {
|
match navigation.forward(subject) {
|
||||||
Some((mut start, _)) => {
|
Some((mut start, _)) => {
|
||||||
|
navigation.update();
|
||||||
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
|
||||||
}
|
}
|
||||||
navigation.update()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => todo!(),
|
None => todo!(),
|
||||||
|
|
@ -126,30 +126,27 @@ 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 |_| {
|
move |_| match subject.borrow().as_ref() {
|
||||||
match subject.borrow().as_ref() {
|
|
||||||
Some(subject) => match navigation.back(subject) {
|
Some(subject) => match navigation.back(subject) {
|
||||||
Some((mut start, _)) => {
|
Some((mut start, _)) => {
|
||||||
|
navigation.update();
|
||||||
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()
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
navigation.forward.button.connect_clicked({
|
navigation.forward.button.connect_clicked({
|
||||||
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 |_| {
|
move |_| match subject.borrow().as_ref() {
|
||||||
match subject.borrow().as_ref() {
|
|
||||||
Some(subject) => match navigation.forward(subject) {
|
Some(subject) => match navigation.forward(subject) {
|
||||||
Some((mut start, _)) => {
|
Some((mut start, _)) => {
|
||||||
|
navigation.update();
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
|
@ -158,8 +155,6 @@ impl Form {
|
||||||
|
|
||||||
None => todo!(),
|
None => todo!(),
|
||||||
}
|
}
|
||||||
navigation.update()
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue