Fix: Remove terminal queries from history to prevent terminal responses on stdin (#10)

This commit is contained in:
David Beesley
2026-01-20 12:54:43 +13:00
committed by GitHub
parent 68c04b5d2c
commit 35ecc80e2f
4 changed files with 529 additions and 6 deletions

View File

@@ -206,7 +206,15 @@ if {$vi_cmd eq ""} {
# Start vi/vim with no config to avoid user rc issues
send "$vi_cmd -u NONE\r"
sleep 1
# Wait for alt screen sequence before sending input
# This ensures vim has fully started and alt screen is active
# Note: \033 is octal for ESC, \[ escapes the bracket in TCL
expect {
-re "\033\\\[\\?1049h" { }
timeout { fail "$vi_cmd did not enter alt screen" }
}
sleep 0.3
# In vi, Ctrl+^ switches between buffers - should NOT trigger lookback
send "\x1e"