1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Fix allow-newline? in call-with-truncating-output-string

* module/ice-9/pretty-print.scm (call-with-truncating-output-string):
Actually detect newlines.
This commit is contained in:
Andy Wingo 2023-06-02 22:21:23 +02:00
parent 0e4334406a
commit 5af66570bb

View file

@ -36,7 +36,9 @@
(define (write-string str)
(set! length (+ length (string-length str)))
(set! strs (cons str strs))
(when (< (- max-column initial-column) length)
(when (or (< (- max-column initial-column) length)
(and (not allow-newline?)
(not (zero? (port-line port)))))
(abort-to-prompt tag)))
(define port
(make-soft-port #:id "truncating-output-port"