Skip to content

Commit

Permalink
special show for AbstractVector{Method} for ::MIMEtext/plain
Browse files Browse the repository at this point in the history
which is currently done for text/html
this enables the jump-to-method thingy from JuliaLang#22007 to be used with methodswith(Foo) also
This also prevents large spacing in the printing, since the general vector output prints with equal spacing for all elements, and some methods have very long signatures
  • Loading branch information
fredrikekre committed May 26, 2017
1 parent e3aeb42 commit 8a59e12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/methodshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ end

show(io::IO, mime::MIME"text/html", mt::MethodTable) = show(io, mime, MethodList(mt))

# pretty-printing of Vector{Method} for output of methodswith:
function show(io::IO, mt::Vector{Method})
# pretty-printing of AbstractVector{Method} for output of methodswith:
function show(io::IO, mime::MIME"text/plain", mt::AbstractVector{Method})
for (i, m) in enumerate(mt)
print(io, "[$(i)] ")
show(io, m)
Expand Down

0 comments on commit 8a59e12

Please sign in to comment.