Skip to content

Commit

Permalink
bugfix show
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Jan 6, 2025
1 parent 50b2140 commit 2244667
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ for (geomtype, trait, childtype, child_trait, length_check, nesting) in (
# But not if geom is already a WrapperGeometry
convert(::Type{$geomtype}, ::$trait, geom::$geomtype) = geom

function Base.show(io::IO, ::MIME"text/plain", geom::$geomtype{Z, M, T, E, C}; show_mz::Bool = true, screen_ncols::Int = displaysize(io)[2]) where {Z, M, T, E <: Union{Nothing,Extents.Extent}, C}
function Base.show(io::IO, ::MIME"text/plain", geom::$geomtype{Z, M, T, E, C};
show_mz::Bool = true, screen_ncols::Int = displaysize(io)[2]
) where {Z, M, T, E <: Union{Nothing,Extents.Extent}, C}
compact = get(io, :compact, false)
spacing = compact ? "" : " "
show_mz &= !compact
Expand All @@ -188,7 +190,7 @@ for (geomtype, trait, childtype, child_trait, length_check, nesting) in (
end
end

str = "$($geomtype)"
str = string($geomtype)
if show_mz
str *= "{$Z,$(spacing)$M}"
end
Expand Down Expand Up @@ -234,7 +236,7 @@ for (geomtype, trait, childtype, child_trait, length_check, nesting) in (

str *= "]"
else
str *= _nice_geom_str(geom, false, compact, screen_ncols - currently_used_space)
str *= _nice_geom_str(parent(geom), false, compact, screen_ncols - currently_used_space)

Check warning on line 239 in src/wrappers.jl

View check run for this annotation

Codecov / codecov/patch

src/wrappers.jl#L239

Added line #L239 was not covered by tests
end

str *= extent_str
Expand Down

0 comments on commit 2244667

Please sign in to comment.