Add an update function

This commit is contained in:
larstvei 2024-09-21 00:26:46 +02:00
parent 8fd156e918
commit 509db9bbde

View File

@ -127,6 +127,13 @@
;; Restore the original mode-line-format ;; Restore the original mode-line-format
(setq mode-line-format center-content--original-mode-line-format)) (setq mode-line-format center-content--original-mode-line-format))
(defun center-content-update ()
"Updates the centering if `center-content-mode' is enabled."
(interactive)
(when (bound-and-true-p center-content-mode)
(center-content--disable)
(center-content--enable)))
;;;###autoload ;;;###autoload
(define-minor-mode center-content-mode (define-minor-mode center-content-mode
"Toggle horizontal and vertical centering of buffer content. "Toggle horizontal and vertical centering of buffer content.