Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base/stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@ end

skip(s::BufferStream, n) = skip(s.buffer, n)

function reseteof(x::BufferStream)
function reseteof(s::BufferStream)
lock(s.cond) do
s.status = StatusOpen
nothing
Expand Down
10 changes: 5 additions & 5 deletions stdlib/REPL/src/LineEdit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,11 @@ function highlight_region(lwrite::Union{String,SubString{String}}, regstart::Int
end

function refresh_multi_line(terminal::UnixTerminal, args...; kwargs...)
outbuf = IOBuffer()
outbuf = Base.BufferStream()
termbuf = TerminalBuffer(outbuf)
ret = refresh_multi_line(termbuf, terminal, args...;kwargs...)
# Output the entire refresh at once
write(terminal, take!(outbuf))
write(terminal, readavailable(outbuf))
flush(terminal)
return ret
end
Expand Down Expand Up @@ -2658,7 +2658,7 @@ end
activate(m::ModalInterface, s::MIState, termbuf::AbstractTerminal, term::TextTerminal) =
activate(mode(s), s, termbuf, term)

commit_changes(t::UnixTerminal, termbuf::TerminalBuffer) = (write(t, take!(termbuf.out_stream)); nothing)
commit_changes(t::UnixTerminal, termbuf::TerminalBuffer) = (write(t, readavailable(termbuf.out_stream)); nothing)

function transition(f::Function, s::MIState, newmode::Union{TextInterface,Symbol})
cancel_beep(s)
Expand All @@ -2673,7 +2673,7 @@ function transition(f::Function, s::MIState, newmode::Union{TextInterface,Symbol
if !haskey(s.mode_state, newmode)
s.mode_state[newmode] = init_state(terminal(s), newmode)
end
termbuf = TerminalBuffer(IOBuffer())
termbuf = TerminalBuffer(Base.BufferStream())
t = terminal(s)
s.mode_state[mode(s)] = deactivate(mode(s), state(s), termbuf, t)
s.current_mode = newmode
Expand Down Expand Up @@ -2840,7 +2840,7 @@ function prompt!(term::TextTerminal, prompt::ModalInterface, s::MIState = init_s
# spawn this because the main repl task is sticky (due to use of @async and _wait2)
# and we want to not block typing when the repl task thread is busy
t2 = Threads.@spawn :interactive while true
eof(term) || peek(term, Char) # wait before locking but don't consume
Base.wait_readnb(Base.pipe_reader(term), 1) # wait before locking but don't consume
@lock l begin
kmap = keymap(s, prompt)
fcn = match_input(kmap, s)
Expand Down