╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │2583 if (crossPageLink(root_focus, focus_id, session.data)) |route| {│ │2584 return session.navigate(route); │ │2585 } │ │2586 + if (currentPageLink(root_focus, focus_id, session.data)) return;│ │2587 if (rawLink(root_focus, focus_id)) |url| { │ │2588 if (!mouse.ctrl) try requestRawLink(session, url); │ │2589 return; │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2673 // links stay in-page. │ │2674 if (route.parent() != current.parent() or RoutablePage.repoPageChanged(route, current) or RoutablePage.forkPageChanged(route, current) or RoutablePage.homePageChanged(route, current) or RoutablePage.userPageChanged(route, current)) return route;│ │2675 return null; │ │2676 +} │ │2677 + │ │2678 +// whether the `a:` focus target links to the page already shown, which a click │ │2679 +// leaves alone rather than focusing │ │2680 +pub fn currentPageLink(root_focus: *Focus, focus_id: usize, data: Session.Data) bool { │ │2681 + const route = pageLink(root_focus, focus_id, data, "a:") orelse return false; │ │2682 + return route.eql(data.current_page); │ │2683 } │ │2684 │ │2685 // the route carried by an `ai:` focus target, or null for any other target │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯