summaryrefslogtreecommitdiff
path: root/src/mouse.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-05 19:32:34 -0300
committerGabriel Schneider <[email protected]>2026-11-05 22:03:21 -0300
commit8fe1cbd5ba5792b71f4a1b9be6f3e8df591ec52b (patch)
tree6977f394e1f07e9cee6f4ebe791de3e09ba95c4e /src/mouse.zig
parent542e6677e23e277ce39edb3e96d729e9adca99d0 (diff)
downloadpardes-8fe1cbd5ba5792b71f4a1b9be6f3e8df591ec52b.tar.gz
pardes-8fe1cbd5ba5792b71f4a1b9be6f3e8df591ec52b.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/mouse.zig')
-rw-r--r--src/mouse.zig3
1 files changed, 2 insertions, 1 deletions
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