summaryrefslogtreecommitdiff
path: root/core/Trail.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 20:34:09 -0300
committerGabriel Schneider <[email protected]>2026-11-24 20:34:09 -0300
commitcfe32e52db251f3102fd724fc1121d2e7819d0fd (patch)
treec552241573c24efa850a11a2099d040a1b74b603 /core/Trail.zig
parentbdc7084e2a1480272eda770a4e20bb9783c860d3 (diff)
downloadpardes-cfe32e52db251f3102fd724fc1121d2e7819d0fd.tar.gz
pardes-cfe32e52db251f3102fd724fc1121d2e7819d0fd.zip
walk, a fix on top of the frozen items 1-3: what the walk costs where there is none: Trail.edited (an edit holds the panes showing its file) returns at once under `Jumps new-pane` and for an output, a listing, a pager or a Mini, where no pane can read, and tagline.nameAt and forwardSpan return at once for a pane with no walk; RUN FIRST: the gate against tree7, its per-op counts set beside main's own gate merge70-g's (the same base): body-appends +0.16% on every size (+30,860 instructions an op, the same on each: Trail.edited's 64-slot loop at each of its 9P appends to a file pane), client-key-down +0.07 to +0.13%; the counts after it are in the next gate
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'core/Trail.zig')
-rw-r--r--core/Trail.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/Trail.zig b/core/Trail.zig
index 69f149df..01d650a5 100644
--- a/core/Trail.zig
+++ b/core/Trail.zig
@@ -212,7 +212,11 @@ pub fn keep(pane: *Pane) void {
}
/// An edit of file `f`: the panes showing it are held from now on (ยง6.5).
+/// Only where a pane could read: a session whose jumps walk, a file
+/// (isFile), so that an edit anywhere else (an output's, a 9P append's
+/// under `Jumps new-pane`) costs nothing past these checks.
pub fn edited(p: *Pardes, f: *const panes.File.State) void {
+ if (p.settings.jumps != .walk or f.output != null or f.listing != null or f.pager or f.mini != null) return;
for (p.panes) |slot| {
const pane = slot orelse continue;
if (pane.trail.held) continue;