From 8469def61324feb5e278f88bebad36af7a0d997e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 23:38:31 -0300 Subject: A send to Python's REPL runs once, the Enter after the paste, not in it A one-line send (print(1)) to Python 3.14 stopped at ... and needed another Enter: its REPL takes a bracketed paste, and an Enter read in the same read as the paste is part of the paste, one line or not (checked in a real pty). Into a REPL that asked for bracketed paste, the Enters (two for an open block) now wait for its next output, its answer to the paste, or 250 ms with nothing. fs-test runs python3 in a real pty and checks a one-line exec prints at once; the docs' pty/data recipe says to send the Enter apart. Co-Authored-By: Claude Opus 5.5 --- src/panes.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/panes.zig') diff --git a/src/panes.zig b/src/panes.zig index c33fd577..7aea5898 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -135,6 +135,10 @@ pub const Pane = struct { repl: ?struct { lang: u8, letter: u8 } = null, /// It has been told that its program takes no bracketed paste. repl_warned: bool = false, + /// Enters owed to a REPL after a bracketed paste (exec.sendToRepl): sent + /// with its next output, the paste taken, or at `repl_enter_due_ns`. + repl_enter: u8 = 0, + repl_enter_due_ns: u64 = 0, /// A question with its answers in it (`repl_choice`). question: [96]u8 = undefined, question_len: u8 = 0, -- cgit v1.3