From 52049344c1992850ea712e029eb5c4a88a7dfe19 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 27 Sep 2026 22:30:58 -0300 Subject: Move exec out of pardes.zig into exec.zig Pure move, no behaviour change (acme keeps this in exec.c): execute, commandText, max_exec_depth, executeBuiltinLine, applyStartupConfig, runBuiltin and applySettingBuiltin; the getarg-style operand code (withArg, PointerOperand, pointerOperand, heldSelection, chordEachSel); takesCommandLine and the terminals commands run in (spawnTty, spawnV9fsTty, spawnTtyWithMount, evictLonePristineTty, replaceStillborn, ttyForDir); placeDoc; and the save path (submitSave, saveFile, saveTo, askWrite), with the acme-chords test, go verbatim to exec.zig. The methods become free functions taking `p: *Pardes`. executeBuiltinLine is called from ~170 places as `p.executeBuiltinLine(..)`, so Pardes keeps one declaration alias for it and those call sites stay; the other 104 calls change from `p.execute(..)` to `exec.execute(p, ..)`. ninep/ctl.zig has a local named exec, so it writes `pardes.exec.execute` instead of importing the file. Co-Authored-By: Claude Opus 5.5 --- src/Mini.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Mini.zig') diff --git a/src/Mini.zig b/src/Mini.zig index bc93f678..52e26a37 100644 --- a/src/Mini.zig +++ b/src/Mini.zig @@ -2,6 +2,7 @@ const panes = @import("panes.zig"); const std = @import("std"); const pardes = @import("pardes.zig"); +const exec = @import("exec.zig"); const config = @import("config.zig"); const Pardes = pardes.Pardes; const modal = @import("modal.zig"); @@ -187,7 +188,7 @@ pub fn open(p: *Pardes, id: usize, argument: []const u8) !void { .syntax_dirty = false, }; pane.cur_pinned = true; - p.placeDoc(id, free, pane); + exec.placeDoc(p, id, free, pane); p.active = free; } -- cgit v1.3