summaryrefslogtreecommitdiff
path: root/dev/macos
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-25 15:08:20 -0300
committerGabriel Schneider <[email protected]>2026-11-25 15:14:26 -0300
commit514b1ed385cdc2618e68ce13b371f6488a5ee504 (patch)
tree0034d5d5514e3b928174c23a90d673262691c3d3 /dev/macos
parent4e5f978f90db55092420a5f5f8f06fff0a5f3d07 (diff)
downloadpardes-514b1ed385cdc2618e68ce13b371f6488a5ee504.tar.gz
pardes-514b1ed385cdc2618e68ce13b371f6488a5ee504.zip
Trail, panes: a walk step never closes a file with unsaved changes, whatever changed it: the pane is held as Keep holds it and the step opens in its reader; and a held pane's reader with unsaved changes is held, not closed with it (the coordinator's structural item after D1's c1: an Edit in a reading pane, then a Look, closed the edited file and lost its change without a word, because every path that changes a file's text had to remember Trail.edited and one forgot); THE CAUSE: Trail.show, the one place a step leaves a file (deinitPane of the pane it replaces), and removePane's tether (a held pane's reader closes with it, SPEC §11) both trusted `held` to say whether the text was the user's, and `held` is set only by the paths that call Trail.edited: File.load holds no pane (the Edit command's way before D1's xtvnwlpo), and Trail.edited holds nothing under `Jumps new-pane`, so a file typed into there is a reading pane again once the session walks; THE FIX: Trail.show reads the text itself (tagline.dirty, the tag's own unsaved mark: a saving file whose revision is not its saved one, or whose file left the disk): a pane it would close holding such a text is kept (Trail.keep) and the step goes where a held pane's jump goes (look.open from it: its reader, made under it; a line past that file's end closes the new reader again and is the miss it was); removePane holds such a reader instead of closing it; D1's c1 stays (an Edit holds at once, so the pane's tag shows it held before any step); RUN (TEST FIRST): Trail.zig "a walk step never closes a file with unsaved changes: ..." changes a reader's text (rank.zig, the Fixture's held pane's reader) by seven paths, then a Look from it at place.zig:8, and asks rank.zig still open with its change, held, and place.zig in its reader: a 9P write to /pane/N/body, an Edit, a pipe `x|tr a-z A-Z` answered, a language server's edit (Ask.applyAction), a paste, a text typed under `Jumps new-pane` with the session then walking, and a new text put in by File.load; on M12 the first five hold already (each calls Trail.edited) and the last two lose the change (`typed_unwalked: the changed rank.zig was closed by the step`, `load: ...`, expected 0 found 2 at Trail.zig:1270); with show's fix the test's last part, the owner closed while its reader holds a File.load's change, fails at Trail.zig:1296 (the reader closed with it); both pass now; a user could hit it after setting `Jumps walk` in a session with an unsaved file (and, before D1's c1, after any Edit), or with any future path that changes a text without Trail.edited; core-test 1109/1280 (171 skipped: M12's 1108 + this test), load 1.1 to 3.6
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'dev/macos')
0 files changed, 0 insertions, 0 deletions