update
This commit is contained in:
@@ -36,8 +36,8 @@ ITERM2_EXPECTED_RESPONSE=$(printf "\033]1337;") # followed by "ReportCellSize=..
|
||||
FENCE_CODE=$(printf "\033[c")
|
||||
|
||||
# Set terminal to raw mode with timeout
|
||||
stty_orig=$(stty -g)
|
||||
trap 'stty "$stty_orig"' EXIT INT TERM HUP
|
||||
stty_orig=$(stty -g < /dev/tty)
|
||||
trap 'stty "$stty_orig" < /dev/tty' EXIT INT TERM HUP
|
||||
stty -echo -icanon min 1 time 0
|
||||
|
||||
printf "%s%s%s" "$ITERM2_QUERY_CODE" "$KGP_QUERY_CODE" "$FENCE_CODE" > /dev/tty
|
||||
@@ -48,7 +48,7 @@ support_sixel=0
|
||||
|
||||
response=""
|
||||
while true; do
|
||||
IFS= read -r -N 1 -t "$TIMEOUT" char || {
|
||||
IFS= read -r -N 1 -t "$TIMEOUT" char < /dev/tty || {
|
||||
[ -z "$char" ] && break
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user