branch: externals/nano-modeline commit 3e29afaea2a40fb553bea5dee773009eda43358e Author: Nicolas P. Rougier <nicolas.roug...@inria.fr> Commit: Nicolas P. Rougier <nicolas.roug...@inria.fr>
Better alignment with fringes and margins --- nano-modeline.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nano-modeline.el b/nano-modeline.el index e0c34d6e0d..c69910ef58 100644 --- a/nano-modeline.el +++ b/nano-modeline.el @@ -211,10 +211,16 @@ using the given FACE-PREFIX as the default." (concat (truncate-string-to-width left left-max-size) (propertize "…" 'face `(:inherit ,nano-modeline-base-face))) left))) - (concat left + (concat (propertize " " + 'display `(space :align-to (+ left-margin + (0.0 . left-fringe) + (1.0 . left-margin)))) + left (propertize " " 'face `(:inherit ,nano-modeline-base-face) - 'display `(space :align-to (- right ,(length right)))) + 'display `(space :align-to (- right + (-1.0 . right-fringe) + ,(length right)))) right)))) (defun nano-modeline-header (left &optional right default)