mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
pretty-print print-sequence width error
Avoid the "expected a positive width" display error when printing sequences with no width remaining. * module/ice-9/pretty-print (print-sequence): test for zero width when printing sequences
This commit is contained in:
parent
289c3a6112
commit
bf61ca3302
1 changed files with 1 additions and 1 deletions
|
@ -334,7 +334,7 @@ sub-expression, via the @var{breadth-first?} keyword argument."
|
|||
(display #\space))
|
||||
(cond
|
||||
((= i len)) ; catches 0-length case
|
||||
((= i (1- len))
|
||||
((and (= i (1- len)) (or (zero? i) (> width 1)))
|
||||
(print (ref x i) (if (zero? i) width (1- width))))
|
||||
((<= width (+ 1 ellipsis-width))
|
||||
(display "..."))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue