Compare commits

...

2 Commits

Author SHA1 Message Date
6527a1c814 Add center-content-update to hooks 2024-09-24 08:26:10 +02:00
60d7910690 Rename to center-content-mode 2024-09-24 08:26:10 +02:00

View File

@ -1,4 +1,4 @@
;;; center-content.el --- Center buffer content -*- lexical-binding: t; -*- ;;; center-content-mode.el --- Center buffer content -*- lexical-binding: t; -*-
;;; Commentary: ;;; Commentary:
@ -144,9 +144,14 @@ and vertically within the window."
:global nil :global nil
:lighter " Center" :lighter " Center"
(if center-content-mode (if center-content-mode
(center-content--enable) (progn
(center-content--disable))) (center-content--enable)
(add-hook 'post-command-hook #'center-content-update 50 t)
(add-hook 'window-configuration-change-hook #'center-content-update 50 t))
(center-content--disable)
(remove-hook 'post-command-hook #'center-content-update t)
(remove-hook 'window-configuration-change-hook #'center-content-update t)))
(provide 'center-content) (provide 'center-content-mode)
;;; center-content.el ends here ;;; center-content-mode.el ends here