summaryrefslogtreecommitdiff
path: root/src/look.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 07:11:20 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commitee316b57d58c91e103210b1adc428f618f630002 (patch)
tree35bed7b2a957a70ece3aecd86784e9544d2c40b4 /src/look.zig
parente3e698fd14c9c7eb6906c95beeeb8e12f08f8b94 (diff)
downloadpardes-ee316b57d58c91e103210b1adc428f618f630002.tar.gz
pardes-ee316b57d58c91e103210b1adc428f618f630002.zip
A line address to no open pane, `@p77:3`, is a miss said as one, not the active pane
`@p<serial>:<line>` goes the line way (parsePathLine), where a serial naming no pane quietly did nothing and look read back the active pane. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/look.zig')
-rw-r--r--src/look.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/look.zig b/src/look.zig
index 6a4fe1d1..28986552 100644
--- a/src/look.zig
+++ b/src/look.zig
@@ -1365,8 +1365,9 @@ pub fn lookAt(p: *Pardes, id: usize, operand: []const u8) void {
},
.pane => |t| {
- if (t.id >= MAX_PANES) return;
- const target = p.panes[t.id] orelse return;
+ // `@p<serial>` names no open pane: a miss, said.
+ if (t.id >= MAX_PANES or p.panes[t.id] == null) return missed(p, id, "no pane {s}", .{pl.path[0..@min(pl.path.len, 32)]});
+ const target = p.panes[t.id].?;
const before = p.active;
clearNavigationSelection(p, target);
focusPaneLine(p, t.id, t.at, .center);