Skip to content

Commit 44b5b85

Browse files
committed
fixup! feat: add find-in-page, closes #585
1 parent bcf63f6 commit 44b5b85

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

examples/find_in_page.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ fn main() -> wry::Result<()> {
6363
text,
6464
FindInPageOption {
6565
case_sensitive: true,
66+
max_match_count: 100,
6667
..FindInPageOption::default()
6768
},
6869
|found| println!("Is found: {}", found),

src/webview/webkitgtk/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ impl InnerWebView {
297297
};
298298

299299
let find_controller = {
300-
let mut builder = FindControllerBuilder::new();
300+
let builder = FindControllerBuilder::new();
301301
let controller = builder.web_view(&*webview).build();
302302
Rc::new(controller)
303303
};
@@ -424,10 +424,10 @@ impl InnerWebView {
424424

425425
self
426426
.find_controller
427-
.connect_failed_to_find_text(move |_| (*f)(false));
427+
.connect_failed_to_find_text(move |_| (*handler)(false));
428428
self
429429
.find_controller
430-
.connect_found_text(move |_, _| (*f)(true));
430+
.connect_found_text(move |_, _| (*found)(true));
431431
}
432432
}
433433

0 commit comments

Comments
 (0)