1
0
Fork 0

- fixed padding when fitting suggestions into 'suggestion-win'.

This commit is contained in:
cage 2021-07-22 16:29:51 +02:00
parent 819c90f179
commit 0fea0d59b4
2 changed files with 8 additions and 3 deletions

View File

@ -30,13 +30,13 @@
(let* ((lines (list "1121"
"234"
"567"))
(batches (box-fit-multiple-column lines 8 2)))
(batches (box-fit-multiple-column lines 9 2)))
batches))
(deftest column-fit (text-utils-suite)
(assert-true
(tree-equal (column-fit)
'((("1121" "234 ") (" 567" " ")))
'((("1121 " "234 ") ("567 " " ")))
:test #'string=)))
(deftest column-fit-annotated (text-utils-suite)

View File

@ -554,7 +554,12 @@ printed in the box column by column; in the example above the results are:
(multiple-value-bind (columns rest-index)
(box-fit-as-much-lines-columns lines box-width
box-height
:spaces-between spaces-between)
:spaces-between spaces-between
:pad-right-fn
(lambda (a max-width)
(right-padding a (+ max-width
spaces-between)))
:pad-left-fn #'identity)
(if rest-index
(append (list columns)
(box-fit-multiple-column (subseq lines rest-index)