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:
parent
0e4334406a
commit
5af66570bb
1 changed files with 3 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue