summaryrefslogtreecommitdiff
path: root/src/Core.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 05:48:20 -0300
committerGabriel Schneider <[email protected]>2026-11-10 05:52:38 -0300
commit3eb166e287ec5afbd54b03a86711610e1b5269b6 (patch)
tree3d0577ada14499c3dcad84926ab52b6c6f54c6f1 /src/Core.zig
parent8903d352237919455996831047017ae57f2a83ef (diff)
downloadpardes-3eb166e287ec5afbd54b03a86711610e1b5269b6.tar.gz
pardes-3eb166e287ec5afbd54b03a86711610e1b5269b6.zip
panes: exec.noteRun and exec.commandDone become Pane methods (pane.noteRun, pane.commandDone) at the end of the Pane struct, beside the command_* fields they keep, since they act on one command pane; commandDone takes the pane its two callers in Core already hold, with its id for the close and the report, in place of looking it up again
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Core.zig')
-rw-r--r--src/Core.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Core.zig b/src/Core.zig
index 643ba4ae..c5187616 100644
--- a/src/Core.zig
+++ b/src/Core.zig
@@ -1277,7 +1277,7 @@ pub fn shellFailed(p: *Pardes, id: u8, err: anyerror) void {
// hears one, its tag stops saying it runs, and Kill finds nothing.
if (pane.command != null and !pane.command_done) {
pane.command_pty = false;
- exec.commandDone(p, id, 127);
+ pane.commandDone(p, id, 127);
} else if (pane.command == null and !pane.had_shell) {
// A Term whose shell never ran: no dead pane left behind; the
// write that asked for it has failed with why. A terminal whose
@@ -1607,7 +1607,7 @@ pub fn update(p: *Pardes, ev: Event) void {
if (pane.command == null)
ctlfs.pty.shellExited(p, pane, e.status)
else if (!pane.command_done)
- exec.commandDone(p, e.pane, e.status);
+ pane.commandDone(p, e.pane, e.status);
},
.eof => |e| if (p.panes[e.pane]) |pane| if (pane.command != null) {
// Output is over; the command is over when its child exits.