Skip to content

Commit 4f73065

Browse files
Base.active_repl -> active_repl
As `active_repl` is imported from Base, it should not be needed to annotate the variable. This is done in an attempt to fix the failing test, stating that "active_repl" is not defined.
1 parent aab7c9b commit 4f73065

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

stdlib/REPL/src/Terminals.jl

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ abstract type AbstractTerminal <: Base.AbstractPipe end
4646
abstract type TextTerminal <: AbstractTerminal end
4747

4848
# Terminal interface:
49-
pipe_reader(::TextTerminal=Base.active_repl.t) = error("Unimplemented")
50-
pipe_writer(::TextTerminal=Base.active_repl.t) = error("Unimplemented")
51-
displaysize(::TextTerminal=Base.active_repl.t) = error("Unimplemented")
49+
pipe_reader(::TextTerminal=active_repl.t) = error("Unimplemented")
50+
pipe_writer(::TextTerminal=active_repl.t) = error("Unimplemented")
51+
displaysize(::TextTerminal=active_repl.t) = error("Unimplemented")
5252
cmove(t::TextTerminal, x, y) = error("Unimplemented")
53-
cmove(x, y) = cmove(Base.active_repl.t, x, y)
53+
cmove(x, y) = cmove(active_repl.t, x, y)
5454
"""
5555
csave()
5656
csave(t)
@@ -62,7 +62,7 @@ Note that if this is run in the REPL, the cursor moves as it is run,
6262
and the final position is the one saved. This means that
6363
the saved position is just after "julia>" on the next line.
6464
"""
65-
csave(t::TextTerminal=Base.active_repl.t) = error("Unimplemented")
65+
csave(t::TextTerminal=active_repl.t) = error("Unimplemented")
6666
"""
6767
crestore()
6868
crestore(t)
@@ -74,10 +74,10 @@ to `Base.active_repl.t`.
7474
Note that after the cursor position is restores, anything
7575
to the right it on the same line is cleared.
7676
"""
77-
crestore(t::TextTerminal=Base.active_repl.t) = error("Unimplemented")
78-
getX(t::TextTerminal=Base.active_repl.t) = error("Unimplemented")
79-
getY(t::TextTerminal=Base.active_repl.t) = error("Unimplemented")
80-
pos(t::TextTerminal=Base.active_repl.t) = (getX(t), getY(t))
77+
crestore(t::TextTerminal=active_repl.t) = error("Unimplemented")
78+
getX(t::TextTerminal=active_repl.t) = error("Unimplemented")
79+
getY(t::TextTerminal=active_repl.t) = error("Unimplemented")
80+
pos(t::TextTerminal=active_repl.t) = (getX(t), getY(t))
8181

8282
# Absolute fallbacks are provided for relative movements
8383
cmove_up(t::TextTerminal, n=1) = cmove(getX(t), max(1, getY(t) - n))
@@ -102,33 +102,33 @@ cmove_col(t::TextTerminal, c) = cmove(c, getY(t))
102102
cmove_col(c) = cmove_col(Base.current_repl.t, n)
103103

104104
# Defaults
105-
hascolor(::TextTerminal=Base.active_repl.t) = false
105+
hascolor(::TextTerminal=active_repl.t) = false
106106

107107
# Utility Functions
108-
width(t::TextTerminal=Base.active_repl.t) = (displaysize(t)::Tuple{Int,Int})[2]
109-
height(t::TextTerminal=Base.active_repl.t) = (displaysize(t)::Tuple{Int,Int})[1]
108+
width(t::TextTerminal=active_repl.t) = (displaysize(t)::Tuple{Int,Int})[2]
109+
height(t::TextTerminal=active_repl.t) = (displaysize(t)::Tuple{Int,Int})[1]
110110

111111
# For terminals with buffers
112-
flush(t::TextTerminal=Base.active_repl.t) = nothing
112+
flush(t::TextTerminal=active_repl.t) = nothing
113113

114-
clear(t::TextTerminal=Base.active_repl.t) = error("Unimplemented")
114+
clear(t::TextTerminal=active_repl.t) = error("Unimplemented")
115115
clear_line(t::TextTerminal, row) = error("Unimplemented")
116-
clear_line(row) = clear_line(Base.active_repl.t, row)
117-
clear_line(t::TextTerminal=Base.active_repl.t) = error("Unimplemented")
116+
clear_line(row) = clear_line(active_repl.t, row)
117+
clear_line(t::TextTerminal=active_repl.t) = error("Unimplemented")
118118

119119
raw!(t::TextTerminal, raw::Bool) = error("Unimplemented")
120-
raw!(raw::Bool) = raw!(Base.active_repl.t, raw)
120+
raw!(raw::Bool) = raw!(active_repl.t, raw)
121121

122-
beep(t::TextTerminal=Base.active_repl.t) = nothing
123-
enable_bracketed_paste(t::TextTerminal=Base.active_repl.t) = nothing
124-
disable_bracketed_paste(t::TextTerminal=Base.active_repl.t) = nothing
122+
beep(t::TextTerminal=active_repl.t) = nothing
123+
enable_bracketed_paste(t::TextTerminal=active_repl.t) = nothing
124+
disable_bracketed_paste(t::TextTerminal=active_repl.t) = nothing
125125

126126
## UnixTerminal ##
127127

128128
abstract type UnixTerminal <: TextTerminal end
129129

130-
pipe_reader(t::UnixTerminal=Base.active_repl.t) = t.in_stream::IO
131-
pipe_writer(t::UnixTerminal=Base.active_repl.t) = t.out_stream::IO
130+
pipe_reader(t::UnixTerminal=active_repl.t) = t.in_stream::IO
131+
pipe_writer(t::UnixTerminal=active_repl.t) = t.out_stream::IO
132132

133133
mutable struct TerminalBuffer <: UnixTerminal
134134
out_stream::IO

0 commit comments

Comments
 (0)