Skip to content

Commit

Permalink
fix oversize printing
Browse files Browse the repository at this point in the history
  • Loading branch information
StevellM committed Oct 10, 2023
1 parent 9011dbd commit b163274
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Misc/MSet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function Base.show(io::IO, ::MIME"text/plain", s::MSet)
end
else
lmax = maximum(length(sprint(show, a)) for a in un[1:szh])
for i in 1:sz
for i in 1:szh
println(io)
k = un[i]
lk = length(sprint(show, k))
Expand Down
4 changes: 4 additions & 0 deletions test/Misc/MSet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
print(IOContext(io, :supercompact => true), m)
@test length(String(take!(io))) == 39

M = MSet(root_lattice(:A, i) for j in 1:10 for i in 1:100)
show(io, MIME"text/plain"(), m)
@test length(String(take!(io))) == 983

m = @inferred multiset(Int[x^3%8 for x = 1:50])
@test !isempty(m)
@test length(m) == 50
Expand Down

0 comments on commit b163274

Please sign in to comment.