summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/builtins.zig b/src/builtins.zig
index bb91d0b0..d106330e 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -427,7 +427,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");
@@ -747,13 +752,13 @@ pub const Petscii = struct {
pub const takes_arg = true;
pub fn run(c: Ctx) void {
// `on|off` sets it, as the tag's `petscii:on` reads; none flips it.
- const now = if (c.pane.addon) |k| k.art.glyph else panes.terminal.petscii(c.pane) orelse false;
+ const now = if (c.pane.addon) |k| k.art.glyph else panes.Term.petscii(c.pane.terminal) orelse false;
if (c.arg != null) {
const want = stateArg(c, OnOff, "Petscii", "on or off") orelse return;
if ((want == .on) == now) return;
}
if (c.pane.addon) |k| k.art.glyph = !k.art.glyph;
- panes.terminal.togglePetscii(c.pane);
+ if (c.pane.terminal) |state| panes.Term.togglePetscii(state);
}
};