-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mention methodtable Ctrl+Q trick in methodshow #35556
Changes from all commits
716f9d8
3971667
2a32e13
d4269ff
19d57b3
0ca2803
c3dd3d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -240,6 +240,7 @@ function show_method_table(io::IO, ms::MethodList, max::Int=-1, header::Bool=tru | |||
end | ||||
n = rest = 0 | ||||
local last | ||||
LAST_SHOWN_LINE_INFOS = get(io, :LAST_SHOWN_LINE_INFOS, Tuple{String,Int}[]) | ||||
|
||||
resize!(LAST_SHOWN_LINE_INFOS, 0) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
for meth in ms | ||||
|
@@ -373,6 +374,7 @@ show(io::IO, mime::MIME"text/html", mt::Core.MethodTable) = show(io, mime, Metho | |||
|
||||
# pretty-printing of AbstractVector{Method} | ||||
function show(io::IO, mime::MIME"text/plain", mt::AbstractVector{Method}) | ||||
LAST_SHOWN_LINE_INFOS = get(io, :LAST_SHOWN_LINE_INFOS, Tuple{String,Int}[]) | ||||
resize!(LAST_SHOWN_LINE_INFOS, 0) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't you need struct TwoMethodTables
methods1
methods2
end
function Base.show(io::IO, ::MIME"text/plain", two::TwoMethodTables)
println(io, "TwoMethodTables:")
show(io, MIME"text/plain"(), two.methods1)
show(io, MIME"text/plain"(), two.methods2)
end Currently, I think Ctrl+Q works for numbering in |
||||
first = true | ||||
for (i, m) in enumerate(mt) | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it OK to skip
resize!
here? What happens when multiple stack traces are shown (via nested errors)? WouldIOContext
be reset appropriately?