Skip to content

Commit

Permalink
fix errors on v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Jul 24, 2020
1 parent b3f0efe commit 09c9dc5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ function rewrite_with_ANSI(s, cursormove::Bool = false)

l = textwidth(get_prompt(s))
if !isa(s, LineEdit.SearchState)
LineEdit.write_prompt(termbuf, mode)
# xref: https://github.com/JuliaLang/julia/pull/36689
@static if VERSION v"1.6.0-DEV.531"
LineEdit.write_prompt(termbuf, mode, LineEdit.hascolor(terminal(s)))
else
LineEdit.write_prompt(termbuf, mode)
end
LineEdit.write(termbuf, "\e[0m") # Reset any formatting from Julia so that we start with a clean slate
end

Expand Down

0 comments on commit 09c9dc5

Please sign in to comment.