diff --git a/center-content.el b/center-content.el index 521a666..bd71c53 100644 --- a/center-content.el +++ b/center-content.el @@ -69,20 +69,20 @@ "Add overlay for vertical centering relative to CONTENT-HEIGHT." (let* ((top-margin (center-content--calculate-top-margin content-height))) ;; Save and remap the header-line face to match the default face - (setq center-content--original-header-line-format header-line-format) (setq center-content--header-line-face-remap-cookie (face-remap-add-relative 'header-line 'default)) (setq header-line-format (propertize " " 'display `(height ,top-margin))))) (defun center-content--enable () "Enable horizontal and vertical centering of content." + (setq center-content--original-header-line-format header-line-format) + (setq center-content--original-mode-line-format mode-line-format) (let* ((content-size (center-content--content-pixel-size))) (when center-content-horizontal (center-content--horizontal (car content-size))) (when center-content-vertical (center-content--vertical (cdr content-size))) (when center-content-hide-mode-line - (setq center-content--original-mode-line-format mode-line-format) (setq mode-line-format nil)))) (defun center-content--disable ()