update method name

This commit is contained in:
yggverse 2024-12-15 15:38:56 +02:00
parent d383778e7d
commit 87d6f10170

View File

@ -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,