diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 19:44:08 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 22:03:21 -0300 |
| commit | 1a1ce29051ea6aa3be4754074f6a00b905d6b208 (patch) | |
| tree | 7f432c87aba2a4c21c5bf8eeeee1d873c2247adb /src/exec.zig | |
| parent | 69e809f64a30b09d9bd5ab56a3a80e94fc3f99c3 (diff) | |
| download | pardes-1a1ce29051ea6aa3be4754074f6a00b905d6b208.tar.gz pardes-1a1ce29051ea6aa3be4754074f6a00b905d6b208.zip | |
split pardes.zig by noun, panes: the session's pane slots move into src/panes.zig, beside the Pane they hold: making a pane (installPane, newShell, emitSpawn, newCommand, newDocPane, the scratches, openTutorView and its tutor text, setTestFile), finding one (freeSlot, paneBySerial, paneIdOf, anyPane, neighbourPane, standIn, paneDir), closing one (removePane, retirePane, teardownPane, reapPanes, deinitPane, detachCwds) and a pane's prompt (startPrompt, promptTarget); the session keeps ten as declaration aliases, the eight called from everywhere (freeSlot, paneBySerial, setTestFile, newShell, newDocPane, newScratchBelow, removePane, paneDir) and the two dump.zig calls (emitSpawn, installPane), so the persistence agent's file is untouched; the rest are panes.x(p, ...) in their callers (21 files, test/panes.zig and test/pdf.zig through pardes.panes); helpers they reach in the session are pub (noteClosed, besideColumn, parkPendingWrite, dropPendingWrite, RetiredPanes.retire); tests moved with them, by name: owned cwd preserves long paths aliases and failed updates; owned cwd close copies are transactional across inherited chains; owned cwd column close allocates every copy before removing any pane; owned cwd EOF failure retains the pane and Del retries its close; owned cwd restore either copies the directory or preserves the old core; owned cwd Save promotion releases the former directory; the Tutor pane is named +Tutor in the session's directory, never a bare path at the root; New opens an empty scratch below the caller, inheriting its directory; a prompt chip is a band with its caret, still on the grid, and only the chip swallows a click; a prompt is typed on its own line in the notice band and leaves the tag row alone; a pure move, no field touched, a dump and the wire as they were; gates: tui core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), gui unit-test 1518/1519 (1 skipped)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/exec.zig')
| -rw-r--r-- | src/exec.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exec.zig b/src/exec.zig index 81826271..6ed37624 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -774,7 +774,7 @@ fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize { p.reportError(from, "exec", error.NoPaneSlots); return null; }; - const pane = p.newCommand(free, dir, line) catch |err| { + const pane = panes.newCommand(p, free, dir, line) catch |err| { p.reportError(from, "exec", err); return null; }; @@ -990,7 +990,7 @@ pub fn runBuiltinFrom(p: *Pardes, b: Builtin, id: usize, txt: []const u8, arg: ? } // No pane at all (the window Delcol emptied): a word runs all the same, // with a stand-in that is no pane (New, Newcol, Exit are what make sense). - const pane = p.panes[id] orelse (if (builtins.registry.scope(b) == .session or p.anyPane() == null) p.standIn() orelse return else return); + const pane = p.panes[id] orelse (if (builtins.registry.scope(b) == .session or panes.anyPane(p) == null) panes.standIn(p) orelse return else return); // A builtin says its own name before it runs, so a tagline click is // legible even when what it did is invisible. Whatever the builtin // then says for itself replaces the announcement. It is the message |
