Can’t understand from documentation the difference.
I’m using following construction to detect TextTag
location for links in TextBuffer
primary_button_controller.connect_released({
move |_, _, window_x, window_y| {
let (buffer_x, buffer_y) = text_view.window_to_buffer_coords(
TextWindowType::Text,
window_x as i32,
window_y as i32,
);
if let Some(iter) = text_view.iter_at_location(buffer_x, buffer_y) {
for tag in iter.tags() {
// ..
Both variants are working, which one is better to choose in this case?
Thanks