From 1d382a3ed42788e82301d0ce2a16ebc35c79046c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 00:32:48 -0300 Subject: 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 --- src/term/echo.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/term/echo.zig') diff --git a/src/term/echo.zig b/src/term/echo.zig index d069fe36..9ea13111 100644 --- a/src/term/echo.zig +++ b/src/term/echo.zig @@ -533,7 +533,7 @@ fn blank(cp: u21) bool { /// pardes's marks is trusted only once its echo is confirmed. fn atPrompt(pane: *const Pane) bool { const state = pane.terminal orelse return false; - return state.vt.screens.active_key == .primary and state.stream.handler.phase == .input and terminal.promptInputReady(pane); + return state.vt.screens.active_key == .primary and state.stream.handler.phase == .input and terminal.prompt(state).input_ready; } /// The terminal view `view`'s keys go to, in tty mode: none when they go -- cgit v1.3