╭ changed ────────╮ │src/main_wasm.zig│ ╰─────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │161 _navigate(url.ptr, @intCast(url.len)); │ │162 return; │ │163 } │ │164 + if (ui.currentPageLink(root_ptr.getFocus(), focus_id, session.data)) return;│ │165 try setFocus(focus_id); │ │166 } │ │167 │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │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 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │219 const tabs_child = self.tabsChild(); │ │220 const tabs_box = &tabs_child.widget.box; │ │221 │ │222 - const selected_tab = if (box.getFocus().child_id == self.tabs_id) tabs_box.getFocus().child_id else null;│ │222 + const selected_tab = tabs_box.getFocus().child_id; │ │223 var tabs_width: usize = 0; │ │224 for (tabs_box.children.keys(), tabs_box.children.values()) |id, *child| { │ │225 const text_box: ?*wgt.TextBox = switch (child.widget) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │244 const tabs_box = &tabs_child.widget.box; │ │245 │ │246 // only the selected tab shows its border │ │247 - const selected_tab = if (box.getFocus().child_id == self.tabs_id) tabs_box.getFocus().child_id else null;│ │247 + const selected_tab = tabs_box.getFocus().child_id; │ │248 var tabs_width: usize = 0; │ │249 for (tabs_box.children.keys(), tabs_box.children.values()) |id, *child| { │ │250 const tb: ?*wgt.TextBox = switch (child.widget) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │430 const tabs_box = &tabs_child.widget.box; │ │431 │ │432 // only the selected tab shows its border │ │433 - const selected_tab = if (box.getFocus().child_id == self.tabs_id) tabs_box.getFocus().child_id else null;│ │433 + const selected_tab = tabs_box.getFocus().child_id; │ │434 var tabs_width: usize = 0; │ │435 for (tabs_box.children.keys(), tabs_box.children.values()) |id, *child| { │ │436 const tb: ?*wgt.TextBox = switch (child.widget) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/User/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │258 const tabs_box = &tabs_child.widget.box; │ │259 │ │260 // only the selected tab shows its border │ │261 - const selected_tab = if (box.getFocus().child_id == self.tabs_id) tabs_box.getFocus().child_id else null;│ │261 + const selected_tab = tabs_box.getFocus().child_id; │ │262 var tabs_width: usize = 0; │ │263 for (tabs_box.children.keys(), tabs_box.children.values()) |id, *child| { │ │264 const tb: ?*wgt.TextBox = switch (child.widget) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯