From 189ec65aae78f048d311f715087f1ddff903a8df Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Fri, 7 Aug 2026 17:44:05 +0200 Subject: [PATCH] o prompt: buffer multi-line paste input Drains additional lines within 50ms of the first line to capture multi-line pastes in the TUI prompt. --- data/scripts/o | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/scripts/o b/data/scripts/o index b671925..2180e09 100755 --- a/data/scripts/o +++ b/data/scripts/o @@ -328,6 +328,10 @@ cmd_prompt() { printf "\n" break fi + # Drain any remaining lines from a multi-line paste (bracketed paste or fast input) + while IFS= read -r -t 0.05 extra_line; do + line="$line"$'\n'"$extra_line" + done if [[ -z "$buf" && "$line" == /* ]]; then history -s "$line" local cmd="${line#/}"