diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 00:32:48 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | 1d382a3ed42788e82301d0ce2a16ebc35c79046c (patch) | |
| tree | 2da33a886055944f17dc7e6c53cdc0aa49735c97 /src/builtins.zig | |
| parent | 9c2fc736b9ccd7b7eea11e7f544ed540d2d2a6c2 (diff) | |
| download | pardes-1d382a3ed42788e82301d0ce2a16ebc35c79046c.tar.gz pardes-1d382a3ed42788e82301d0ce2a16ebc35c79046c.zip | |
Term: prompt and commands through the interface: Term.prompt is the plain record of where the shell is in its command cycle (its phase, commands started, prompts drawn, lines declined, a continuation, the last command to finish and its status, input ready, input empty, the cursor at a prompt), Term.commandOutput what the newest command printed and Term.endOutputHere ends a command's output at the cursor; the pending command queue is the core's (Pane.pending_command, Pane.queuePendingCommand and Pane.releasePendingCommand, released at the shell's start or its prompt where Core.zig hears of them), and so are Pane.greeting, Pane.noteCommand, Kill's "the command pardes typed runs" (builtins.zig) and the newlines that keep a command's output below the edit copy (exec.zig); /pty/status, /pty/run and predicted echo read the record; promptInputReady, promptInputEmpty, commandRunning, armShellSpawn, shellSpawned, deinitPendingCommand and padOutputBelowEdits go; nothing else changes
Diffstat (limited to 'src/builtins.zig')
| -rw-r--r-- | src/builtins.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/builtins.zig b/src/builtins.zig index 85bb6e44..5a1c3061 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -428,7 +428,12 @@ pub const Kill = struct { for (c.p.panes, 0..) |slot, id| { const pane = slot orelse continue; const command: ?[]const u8 = if (pane.command) |line| (if (pane.command_done) null else line) else null; - if (command == null and !panes.terminal.commandRunning(pane)) continue; + // The command pardes last typed here, running now. + const typed_runs = if (pane.sent_command) |sent| typed: { + const at = panes.Term.prompt(pane.terminal); + break :typed at.phase == .running and at.started == sent.seq; + } else false; + if (command == null and !typed_runs) continue; running = true; const first = if (command) |line| first: { const said = std.mem.trim(u8, line, " \t"); |
