summaryrefslogtreecommitdiff
path: root/core/Jump.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-19 20:31:32 -0300
committerGabriel Schneider <[email protected]>2026-11-19 20:31:32 -0300
commit0db34fbf28e70c8c6a3c6025c0888fc5ec75201c (patch)
treef2e288668decded9276ebc45907f16d651b06f9e /core/Jump.zig
parent2ab05b536bc3b063666b5aaab497157adc2a9120 (diff)
parentbf351b62e8843a3d173cedeefa2dd0b8ef4b4392 (diff)
downloadpardes-0db34fbf28e70c8c6a3c6025c0888fc5ec75201c.tar.gz
pardes-0db34fbf28e70c8c6a3c6025c0888fc5ec75201c.zip
integration: a pane's and a view's slot as types, with the regular-expression fixes and the fixes the real loops asked for: pardes-ids (Pane.Id and View.Id through the entries, the events, the effects, the Host table and the device messages) and pardes-merge21, merged without a textual conflict; one call site written since on the old type follows (core/draw.zig: the twin test's file_changed event, .pane = .at(0)); tui core-test 848/991 (143 skipped), shell-test 1027/1030, the window builds; gates in the coordinator's ledger
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Jump.zig')
-rw-r--r--core/Jump.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/Jump.zig b/core/Jump.zig
index 6d12495e..66dbd2b6 100644
--- a/core/Jump.zig
+++ b/core/Jump.zig
@@ -267,7 +267,7 @@ pub fn jumpBy(p: *Pardes, delta: i32) void {
const older = delta < 0;
// At an end of the list: said, not a step that silently does nothing.
if (v.jumps.n == 0 or (older and v.jumps.cur == 0) or (!older and v.jumps.cur + 1 >= v.jumps.n))
- return p.setMessage(v.active, if (older) "Back: nothing further back" else "Forward: nothing further on");
+ return p.setMessage(.at(v.active), if (older) "Back: nothing further back" else "Forward: nothing further on");
var next = if (older) v.jumps.cur - 1 else v.jumps.cur + 1;
// A terminal or a scratch has no file to keep to: the step is global.
if (p.panes[v.active]) |here| if (Pardes.recentPlace(here)) |place| if (place.path.len > 0) {
@@ -298,7 +298,7 @@ pub fn jumpBy(p: *Pardes, delta: i32) void {
// stuck on one that cannot open.
if (found == null or !Pardes.recentKeeps(p.tape, found.?.path)) {
var said: Kind.Buf(recent_path_cap + 32) = .{};
- if (found) |e| p.setMessage(v.active, said.print("{s}: deleted, skipped", .{e.path[0..@min(e.path.len, recent_path_cap)]}));
+ if (found) |e| p.setMessage(.at(v.active), said.print("{s}: deleted, skipped", .{e.path[0..@min(e.path.len, recent_path_cap)]}));
const hash = j.path_hash;
var w: usize = 0;
var cur = v.jumps.cur;
@@ -404,11 +404,11 @@ test "jump history terminal rectangle follows output and clears on reflow" {
const p = try Pardes.init(std.testing.allocator, .{ .cols = 60, .rows = 12, .tty_only = true });
defer p.deinit();
const pane = p.panes[0].?;
- p.update(.{ .output = .{ .pane = 0, .bytes = "alpha bravo\r\nsecond line\r\n" } });
+ p.update(.{ .output = .{ .pane = .at(0), .bytes = "alpha bravo\r\nsecond line\r\n" } });
pane.sel[0] = .{ .state = .done, .c0 = 0, .c1 = 4, .r0 = BOX_H, .r1 = BOX_H };
try edit.capturePointerSelection(p, pane, 0);
try std.testing.expectEqualStrings("alpha", try edit.selectionText(p, pane, pane.sel[0]));
- for (0..40) |_| p.update(.{ .output = .{ .pane = 0, .bytes = "more output\r\n" } });
+ for (0..40) |_| p.update(.{ .output = .{ .pane = .at(0), .bytes = "more output\r\n" } });
try std.testing.expectEqualStrings("alpha", try edit.selectionText(p, pane, pane.sel[0]));
pane.resizeGrid(pane.cols - 1, pane.rows);
try std.testing.expect(pane.pointerSelection(pane.sel[0]) == null);