mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Add a sleep to bind.py
With the upcoming fix to place the tty in external-proc mode, add a sleep which resolves a race between emitting a newline and restoring it to shell mode.
This commit is contained in:
parent
db514df95b
commit
21e2b39fa8
1 changed files with 5 additions and 0 deletions
|
@ -283,6 +283,11 @@ expect_prompt("git@", unmatched="ctrl-w does not stop at @")
|
|||
send("bind -k nul 'echo nul seen'\r")
|
||||
expect_prompt()
|
||||
send("\0" * 3)
|
||||
# We need to sleep briefly before emitting a newline, because when we execute the
|
||||
# key bindings above we place the tty in external-proc mode (see #7483) and restoring
|
||||
# the mode to shell-mode races with the newline emitted below (i.e. sometimes it may
|
||||
# be echoed).
|
||||
sleep(0.1)
|
||||
send("\r")
|
||||
expect_prompt("nul seen\r\nnul seen\r\nnul seen", unmatched="nul not seen")
|
||||
|
||||
|
|
Loading…
Reference in a new issue