right-alignment is slightly less janky now yaaaaay!!!

This commit is contained in:
Miranda Marquez 2024-09-28 18:26:58 -08:00
parent caef820683
commit e92d04557b

View File

@ -233,7 +233,13 @@ Use 'window-width' to calculate the total final width."
(left-length (length left-str)) (left-length (length left-str))
(right-length (length right-str)) (right-length (length right-str))
(middle-spc (- (window-width nil 'remap) (+ left-length right-length)))) (middle-spc (- (window-width nil 'remap) (+ left-length right-length))))
(concat left-str (make-string middle-spc (string-to-char " ")) right-str))) (concat left-str
;; (make-string middle-spc (string-to-char " "))
(propertize " "
'display
`(space :align-to ,(- (window-width nil 'remap) right-length)))
right-str
)))
;; (eval `(concat ,@'("one" "two"))) ;; (eval `(concat ,@'("one" "two")))
;; (p11k/justificate '("one" "wto" "three") '("twenty" "23" "forthy-three")) ;; (p11k/justificate '("one" "wto" "three") '("twenty" "23" "forthy-three"))