diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-25 05:17:30 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-25 05:17:57 -0300 |
| commit | 61c40ab7cffc64a11cb5e874eec9568ed06ad95b (patch) | |
| tree | 5fdff15af9c53694ccdb8df946bf9fd8d6de0208 /core/panes.zig | |
| parent | 7611e1bb7a1c3eda2f4ac463881f543653abd035 (diff) | |
| download | pardes-61c40ab7cffc64a11cb5e874eec9568ed06ad95b.tar.gz pardes-61c40ab7cffc64a11cb5e874eec9568ed06ad95b.zip | |
Trail, panes, test/process/window: a pane keeps its number when it walks to another file (walk UI P3 item 5, the coordinator's R9): Trail.show stepped a reading pane in place by opening the new file as a new pane in a free slot, so it took a new serial (B's decision) and `@pN` words, a 9P script holding /pane/N (the frame corpus died on `/pane/N/look: NotFound` and ran under `Jumps new-pane`) and /log's followers (a `del` and a `new`) all lost it; NOW the pane is the same pane on another file, as acme's Get keeps a window's id: the new file's pane takes the old serial and its 9P state (std.mem.swap of `fs`: the opens' event queue, readers, ranges; the old one, never announced, leaves with no record), /log hears `rename N path`, Recent the file opened (the one it left is noted closed with its place, as any close), what jj answered for the file it left goes with it (jj.forget at the step; panes.teardownPane forgets a serial only when no live pane has it), and its text's revision is the left one's plus one, so a worker's parse or paint asked of the old text (both keyed by serial and revision) never lands on the new; the frame corpus (test/process/window.zig) runs under the walk default again: its file pane's Look at notes.md steps it in place and a Look at shapes.zig walks it back where it Del'd notes.md; TEST FIRST: test/behaviour/look_and_exec.zig "a reading pane that walks to another file is the same pane: its number, an open of its files reading the new text, /log's rename for it, the file it left in Recent" (on the base: expected 3, found 4); core-test 1063/1233 (170 skipped), behaviour-test 280/280, pane-test 183/184 (1 skipped); the corpus's frames under walk: in the final gate's report
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'core/panes.zig')
| -rw-r--r-- | core/panes.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/panes.zig b/core/panes.zig index e4ed3e9d..20a03b25 100644 --- a/core/panes.zig +++ b/core/panes.zig @@ -1254,7 +1254,9 @@ pub fn teardownPane(p: *Pardes, pane: *Pane) void { pane.jump.deinit(p.gpa); pane.places.deinit(p.gpa); p.gpa.free(pane.recipe_sels); - @import("jj.zig").forget(p, pane.serial); + // A pane that walked on (Trail.show) is the same pane on another file: + // what jj answers now is its own. + if (p.paneBySerial(pane.serial) == null) @import("jj.zig").forget(p, pane.serial); if (pane.query) |q| { q.deinit(p.gpa); p.gpa.destroy(q); |
