From 8fe1cbd5ba5792b71f4a1b9be6f3e8df591ec52b Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 19:32:34 -0300 Subject: split pardes.zig by noun, Jump: the jump list's functions and its place type move into src/Jump.zig, the clean room's name: Loc and the path cap a closed place names, jumpPath, samePlace, trackJump and jumpBy (the list's fields stay the session's until #38); callers name Jump (builtins.zig's Back and Forward, mouse.zig's side buttons, sync's trackJump, test/pdf.zig as pardes.Jump); the session's recentDot is pub for it; tests moved with them, by name: the jump list never holds two entries in a row the same, when the one between them goes; jump history skips an entry whose pane slot or serial is gone, leaving the selection; Back and Forward take the same steps from the mouse's side buttons and jumpBy (and its JumpsTest); jump history terminal rectangle follows output and clears on reflow; a pure move, no field touched, a dump and the wire as they were; gates on tui: core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/mouse.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mouse.zig') diff --git a/src/mouse.zig b/src/mouse.zig index 6cb602f7..5c315b4e 100644 --- a/src/mouse.zig +++ b/src/mouse.zig @@ -20,6 +20,7 @@ const platform = pardes.platform; const Pane = panes.Pane; const MAX_PANES = pardes.MAX_PANES; const Layer = @import("Layer.zig"); +const Jump = @import("Jump.zig"); const TOPBAR_H = pardes.TOPBAR_H; const BOX_H = pardes.BOX_H; const TAG_TEXT_INSET = pardes.TAG_TEXT_INSET; @@ -484,7 +485,7 @@ pub fn handleMouse(p: *Pardes, event: Mouse) void { if (pane.prompt == .del_side or pane.prompt == .repl_choice) pane.prompt = .none; }; if (m.button == .back or m.button == .forward) { - if (m.kind == .press) p.jumpBy(if (m.button == .back) -1 else 1); + if (m.kind == .press) Jump.jumpBy(p, if (m.button == .back) -1 else 1); return; } // A grip let go past the window's edge, as a browser's tab dragged out -- cgit v1.3