Fix unwanted wrapping.

This commit is contained in:
Dominik Pantůček 2023-06-15 21:52:52 +02:00
parent 97dd257780
commit 7335f86bb9
3 changed files with 16 additions and 9 deletions

View file

@ -51,7 +51,7 @@
members-fees members-fees
mbase mbase
members-print members-print
table-old table
bank-account bank-account
logging) logging)
@ -151,7 +151,7 @@
(append (append
(list "" (list ""
"Active debtors:") "Active debtors:")
(table->list (table->string-list
(cons (list "Id" "Member" "Type" "Balance" "Last payment") (cons (list "Id" "Member" "Type" "Balance" "Last payment")
(map (lambda (mr) (map (lambda (mr)
(list (brmember-id mr) (list (brmember-id mr)
@ -170,8 +170,10 @@
)) ))
debtors)) debtors))
#:border-style 'ascii #:border-style 'ascii
#:col-border #t #:border '(((#:bottom #:right light) ... (#:bottom light))
#:row0-border #t)))) ((#:right light) ... none)
...)
))))
(boring (sort (boring (sort
(find-members-by-predicate (find-members-by-predicate
mb mb
@ -185,7 +187,7 @@
(append (append
(list "" (list ""
"Other active members:") "Other active members:")
(table->list (table->string-list
(cons (list "Id" "Member" "Type" "Balance" "Last payment") (cons (list "Id" "Member" "Type" "Balance" "Last payment")
(map (lambda (mr) (map (lambda (mr)
(list (brmember-id mr) (list (brmember-id mr)
@ -204,8 +206,10 @@
)) ))
boring)) boring))
#:border-style 'ascii #:border-style 'ascii
#:col-border #t #:border '(((#:bottom #:right light) ... (#:bottom light))
#:row0-border #t))))) ((#:right light) ... none)
...)
)))))
(append income-lst (append income-lst
unpaired-lst unpaired-lst
debtors-lst debtors-lst

View file

@ -197,7 +197,9 @@
;;(_ (print width-surplus)) ;;(_ (print width-surplus))
(widths-adds (compute-weighted-width-adds width-surplus col-weights)) (widths-adds (compute-weighted-width-adds width-surplus col-weights))
;;(_ (print widths-adds)) ;;(_ (print widths-adds))
(col-widths (distribute-surplus widths-adds min-widths)) (col-widths (if width-arg
(distribute-surplus widths-adds min-widths)
col-weights))
;;(_ (print col-widths)) ;;(_ (print col-widths))
(tbl1 (render-cells-widths ptbl col-widths)) (tbl1 (render-cells-widths ptbl col-widths))
;;(_ (print tbl1)) ;;(_ (print tbl1))

View file

@ -75,7 +75,8 @@
#:border (border-spec '((none ...) ...)) #:border (border-spec '((none ...) ...))
#:widths (widths-spec '(0 ...)) #:widths (widths-spec '(0 ...))
#:width (width #f) #:width (width #f)
#:unicode? (unicode? (eq? (*table-border-style*) 'unicode)) #:border-style (border-style (*table-border-style*))
#:unicode? (unicode? (eq? border-style 'unicode))
#:ansi-reset? (ansi-reset? #f)) #:ansi-reset? (ansi-reset? #f))
(let-values (((ptbl col-widths) (let-values (((ptbl col-widths)
(table-prepare tbl width widths-spec))) (table-prepare tbl width widths-spec)))