From 9dd346b0c3d3038720641bb9f4c5474665ecfa92 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 13 Oct 2024 11:04:05 +0300 Subject: [PATCH] fix var names mismatch --- .../item/page/content/text/gemini/reader.rs | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs index fba1c22b..94fd61cc 100644 --- a/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs +++ b/src/app/browser/window/tab/item/page/content/text/gemini/reader.rs @@ -147,12 +147,15 @@ impl Reader { let action_page_open = action_page_open.clone(); let gobject = widget.gobject().clone(); let _links_ = links.clone(); // is copy - move |_, _, x, y| { + move |_, _, window_x, window_y| { // Detect tag match current coords hovered - let (window_x, window_y) = - gobject.window_to_buffer_coords(TextWindowType::Widget, x as i32, y as i32); + let (buffer_x, buffer_y) = gobject.window_to_buffer_coords( + TextWindowType::Widget, + window_x as i32, + window_y as i32, + ); - if let Some(iter) = gobject.iter_at_location(window_x, window_y) { + if let Some(iter) = gobject.iter_at_location(buffer_x, buffer_y) { for tag in iter.tags() { // Detect links on tag contain URI if let Some(uri) = _links_.get(&tag) { @@ -173,12 +176,15 @@ impl Reader { motion_controller.connect_motion({ let gobject = widget.gobject().clone(); let _links_ = links.clone(); // is copy - move |_, x, y| { + move |_, window_x, window_y| { // Detect tag match current coords hovered - let (window_x, window_y) = - gobject.window_to_buffer_coords(TextWindowType::Widget, x as i32, y as i32); + let (buffer_x, buffer_y) = gobject.window_to_buffer_coords( + TextWindowType::Widget, + window_x as i32, + window_y as i32, + ); - if let Some(iter) = gobject.iter_at_location(window_x, window_y) { + if let Some(iter) = gobject.iter_at_location(buffer_x, buffer_y) { for tag in iter.tags() { // Tag contain URI (is link) if let Some(_) = _links_.get(&tag) {