mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
update method name
This commit is contained in:
parent
d383778e7d
commit
87d6f10170
1 changed files with 3 additions and 8 deletions
|
|
@ -106,7 +106,7 @@ impl Find {
|
||||||
this.set_secondary_icon_name(Some("edit-clear-symbolic"));
|
this.set_secondary_icon_name(Some("edit-clear-symbolic"));
|
||||||
}
|
}
|
||||||
// apply changes
|
// apply changes
|
||||||
if update(
|
if find(
|
||||||
&text_buffer,
|
&text_buffer,
|
||||||
&found_tag,
|
&found_tag,
|
||||||
entry.text().as_str(),
|
entry.text().as_str(),
|
||||||
|
|
@ -131,7 +131,7 @@ impl Find {
|
||||||
let found_tag = found_tag.clone();
|
let found_tag = found_tag.clone();
|
||||||
let text_buffer = text_buffer.clone();
|
let text_buffer = text_buffer.clone();
|
||||||
move |this| {
|
move |this| {
|
||||||
if update(
|
if find(
|
||||||
&text_buffer,
|
&text_buffer,
|
||||||
&found_tag,
|
&found_tag,
|
||||||
entry.text().as_str(),
|
entry.text().as_str(),
|
||||||
|
|
@ -155,12 +155,7 @@ impl Find {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update(
|
fn find(text_buffer: &TextBuffer, found_tag: &TextTag, subject: &str, is_match_case: bool) -> i64 {
|
||||||
text_buffer: &TextBuffer,
|
|
||||||
found_tag: &TextTag,
|
|
||||||
subject: &str,
|
|
||||||
is_match_case: bool,
|
|
||||||
) -> i64 {
|
|
||||||
// Cleanup previous search results
|
// Cleanup previous search results
|
||||||
text_buffer.remove_tag(
|
text_buffer.remove_tag(
|
||||||
found_tag,
|
found_tag,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue