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.
This commit is contained in:
parent
8397f1aa74
commit
189ec65aae
|
|
@ -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#/}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue