branch: externals/nano-modeline commit 239000d7e18a9381ecdfef0dcaf1dc9a0abc507b Author: Nicolas P. Rougier <nicolas.roug...@inria.fr> Commit: Nicolas P. Rougier <nicolas.roug...@inria.fr>
Handle case when fringes are outside margins --- nano-modeline.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nano-modeline.el b/nano-modeline.el index c69910ef58..a64f5e319b 100644 --- a/nano-modeline.el +++ b/nano-modeline.el @@ -206,20 +206,22 @@ using the given FACE-PREFIX as the default." (apply (car element) (cdr element)))) ',right)) (width (window-width)) + (fringe (if fringes-outside-margins 0.0 -1.0)) (left-max-size (- width (length right) 2)) (left (if (> (length left) left-max-size) (concat (truncate-string-to-width left left-max-size) (propertize "…" 'face `(:inherit ,nano-modeline-base-face))) left))) (concat (propertize " " - 'display `(space :align-to (+ left-margin - (0.0 . left-fringe) - (1.0 . left-margin)))) + 'display `(space :align-to (+ left + (,fringe . left-fringe) + ( 0.0 . left-margin)))) left (propertize " " 'face `(:inherit ,nano-modeline-base-face) 'display `(space :align-to (- right - (-1.0 . right-fringe) + (,fringe . right-fringe) + ( 0.0 . right-margin) ,(length right)))) right))))