Correct simple-modeline--format for olivetti-mode, etc.

This commit is contained in:
Case Duckworth 2021-08-12 21:05:29 -05:00
parent 1e3fdfdb5d
commit 8d204e6bd7
1 changed files with 17 additions and 0 deletions

17
init.el
View File

@ -1400,6 +1400,23 @@ if ripgrep is installed, otherwise `consult-grep'."
acdw-modeline/minions
acdw-modeline/narrowed
simple-modeline-segment-major-mode)))
;; I've put in a pull request to add the (- 0 right-margin) bit here.
(advice-add 'simple-modeline--format :override
(defun simple-modeline@format (lefts rights)
(let* ((left (simple-modeline--format-segments lefts))
(right (simple-modeline--format-segments rights))
(reserve (length right)))
(concat
left
(propertize " "
'display `((space :align-to
(- right
(- 0 right-margin)
,reserve)))
'face '(:inherit simple-modeline-space))
right))))
(simple-modeline-mode +1))
(setup (:straight sly)