@@ -302,7 +302,6 @@ mutable struct BasicREPL <: AbstractREPL
302302end
303303
304304outstream (r:: BasicREPL ) = r. terminal
305- hascolor (r:: BasicREPL ) = hascolor (r. terminal)
306305
307306function run_frontend (repl:: BasicREPL , backend:: REPLBackendRef )
308307 d = REPLDisplay (repl)
@@ -429,14 +428,13 @@ mutable struct LineEditREPL <: AbstractREPL
429428 interface:: ModalInterface
430429 backendref:: REPLBackendRef
431430 LineEditREPL (t,hascolor,prompt_color,input_color,answer_color,shell_color,help_color,history_file,in_shell,in_help,envcolors) =
432- new (t,hascolor ,prompt_color,input_color,answer_color,shell_color,help_color,history_file,in_shell,
431+ new (t,true ,prompt_color,input_color,answer_color,shell_color,help_color,history_file,in_shell,
433432 in_help,envcolors,false ,nothing , Options (), nothing )
434433end
435434outstream (r:: LineEditREPL ) = r. t
436435specialdisplay (r:: LineEditREPL ) = r. specialdisplay
437436specialdisplay (r:: AbstractREPL ) = nothing
438437terminal (r:: LineEditREPL ) = r. t
439- hascolor (r:: LineEditREPL ) = r. hascolor
440438
441439LineEditREPL (t:: TextTerminal , hascolor:: Bool , envcolors:: Bool = false ) =
442440 LineEditREPL (t, hascolor,
@@ -815,7 +813,7 @@ function respond(f, repl, main; pass_empty = false, suppress_on_semicolon = true
815813 response = (catch_stack (), true )
816814 end
817815 hide_output = suppress_on_semicolon && ends_with_semicolon (line)
818- print_response (repl, response, ! hide_output, hascolor (repl) )
816+ print_response (repl, response, ! hide_output, Base . have_color )
819817 end
820818 prepare_next (repl)
821819 reset_state (s)
@@ -957,7 +955,7 @@ function setup_interface(
957955 end
958956 hist_from_file (hp, f, hist_path)
959957 catch
960- print_response (repl, (catch_stack (),true ), true , hascolor (repl) )
958+ print_response (repl, (catch_stack (),true ), true , Base . have_color )
961959 println (outstream (repl))
962960 @info " Disabling history file for this session"
963961 repl. history_file = false
@@ -1157,7 +1155,6 @@ StreamREPL(stream::IO) = StreamREPL(stream, Base.text_colors[:green], Base.input
11571155run_repl (stream:: IO ) = run_repl (StreamREPL (stream))
11581156
11591157outstream (s:: StreamREPL ) = s. stream
1160- hascolor (s:: StreamREPL ) = get (s. stream, :color , false )
11611158
11621159answer_color (r:: LineEditREPL ) = r. envcolors ? Base. answer_color () : r. answer_color
11631160answer_color (r:: StreamREPL ) = r. answer_color
@@ -1216,7 +1213,7 @@ function ends_with_semicolon(line::AbstractString)
12161213end
12171214
12181215function run_frontend (repl:: StreamREPL , backend:: REPLBackendRef )
1219- have_color = hascolor (repl)
1216+ have_color = Base . have_color
12201217 Base. banner (repl. stream)
12211218 d = REPLDisplay (repl)
12221219 dopushdisplay = ! in (d,Base. Multimedia. displays)
0 commit comments