1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-17 08:10:36 +01:00

- 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" (let* ((lines (list "1121"
"234" "234"
"567")) "567"))
(batches (box-fit-multiple-column lines 8 2))) (batches (box-fit-multiple-column lines 9 2)))
batches)) batches))
(deftest column-fit (text-utils-suite) (deftest column-fit (text-utils-suite)
(assert-true (assert-true
(tree-equal (column-fit) (tree-equal (column-fit)
'((("1121" "234 ") (" 567" " "))) '((("1121 " "234 ") ("567 " " ")))
:test #'string=))) :test #'string=)))
(deftest column-fit-annotated (text-utils-suite) (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) (multiple-value-bind (columns rest-index)
(box-fit-as-much-lines-columns lines box-width (box-fit-as-much-lines-columns lines box-width
box-height 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 (if rest-index
(append (list columns) (append (list columns)
(box-fit-multiple-column (subseq lines rest-index) (box-fit-multiple-column (subseq lines rest-index)