1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Fix embarrassing pretty-print bug

* module/ice-9/pretty-print.scm (pretty-print): We were never indenting
more than 8 spaces.  Doh!
* test-suite/tests/print.test (prints?, "pretty-print"): Add test.
This commit is contained in:
Andy Wingo 2023-08-24 12:10:50 +02:00
parent 19c7969fff
commit 1f724ccd39
2 changed files with 21 additions and 5 deletions

View file

@ -106,7 +106,7 @@ port directly after OBJ, like (pretty-print OBJ PORT)."
(when (< 0 n)
(put-string port " " 0 (min 8 n))
(when (< 8 n)
(spaces (- 8 n)))))
(spaces (- n 8)))))
(define (indent to)
(let ((col (port-column port)))