summaryrefslogtreecommitdiff
path: root/src/exec.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 01:42:25 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commitb3d32656413734952bc918c2d4cfd12fede6c214 (patch)
tree04386fab10b9ed803ec31251cb733cc32852390a /src/exec.zig
parent4a33b8d2bd409d4a06205f28e0eb1b4cdaf49889 (diff)
parente6e81a6bc544c5ab5a47c21d85e6868020031abb (diff)
downloadpardes-b3d32656413734952bc918c2d4cfd12fede6c214.tar.gz
pardes-b3d32656413734952bc918c2d4cfd12fede6c214.zip
integration: the diff viewer on general mechanisms, and the plumber's first phase, together
A merge of diff-lib and plumber-1; the changelog keeps both sides' entries; core-test 984/984 on tui, the process suite's tree cases pass (fs-help.txt holds both the rows and the plumb lines in its 45). Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/exec.zig')
-rw-r--r--src/exec.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exec.zig b/src/exec.zig
index be8dc46b..ece4f98d 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -712,7 +712,7 @@ pub fn executeFrom(p: *Pardes, id: usize, txt: []const u8, from_body: bool) ?usi
/// is done, else a new one, placed as layout.placeNew places a command pane.
/// A pane reused keeps what it showed: the new command runs below a line
/// naming it, as acme appends to +Errors and never clears it (util.c:213).
-fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize {
+pub fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize {
if (line.len > command_max) {
p.reportFailure(from, "exec: a command line is at most 1024 bytes");
return null;
@@ -735,7 +735,7 @@ fn runCommand(p: *Pardes, from: usize, line: []const u8) ?usize {
// Nor one leased: an open that was answered its serial and is still
// open reads that pane's output, which another client's command must
// not replace; a new pane runs it instead.
- const reuse: ?usize = if (!p.exec_header and p.exec_column == null and src != null and src.?.command != null and src.?.command_done and !src.?.command_pty and !leased(p, src.?.serial)) from else for (p.panes, 0..) |slot, i| {
+ const reuse: ?usize = if (!p.exec_header and p.exec_column == null and p.exec_dir == null and src != null and src.?.command != null and src.?.command_done and !src.?.command_pty and !leased(p, src.?.serial)) from else for (p.panes, 0..) |slot, i| {
const other = slot orelse continue;
if (p.exec_column) |c| if (if (layout.findPane(p, i)) |f| f.col != c else true) continue;
if (other.command != null and other.command_done and !other.command_pty and std.mem.eql(u8, other.cwdSlice(), dir) and !leased(p, other.serial)) break i;