Skip to content

Commit

Permalink
don't take from stdin if loading is finished
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jun 1, 2024
1 parent cf74683 commit fd23f58
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions stdlib/REPL/src/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1252,9 +1252,11 @@ function setup_interface(
Base.errormonitor(t_replswitch)
# while loading just accept all keys, no keymap functionality
while !istaskdone(t_replswitch)
c = read(stdin, Char)
istaskdone(t_replswitch) && break
edit_insert(s, c)
# wait but only take if task is still running
peek(stdin, Char)
if !istaskdone(t_replswitch)
edit_insert(s, read(stdin, Char))
end
end
else
edit_insert(s, ']')
Expand Down

0 comments on commit fd23f58

Please sign in to comment.