about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/init.el b/init.el index 3d739ef..162c86c 100644 --- a/init.el +++ b/init.el
@@ -344,6 +344,10 @@
344 (apply f r)))) 344 (apply f r))))
345 345
346 (add-hook 'kill-emacs-hook #'erc/disconnect) 346 (add-hook 'kill-emacs-hook #'erc/disconnect)
347
348 (add-hook 'erc-mode-hook
349 (defun erc-mode@setup ()
350 (setq-local scroll-margin 0)))
347 351
348 (:hook erc-autoaway-mode 352 (:hook erc-autoaway-mode
349 erc-track-mode 353 erc-track-mode
@@ -655,7 +659,11 @@ like a dumbass."
655 (defun recenter-to-top (&rest _) 659 (defun recenter-to-top (&rest _)
656 "Recenter the cursor to the top of the window." 660 "Recenter the cursor to the top of the window."
657 (when (called-interactively-p 'any) 661 (when (called-interactively-p 'any)
658 (recenter 5))) 662 (recenter (if (or (null scroll-margin)
663 (zerop scroll-margin))
664 3
665 scroll-margin))))
666
659 (:advise forward-page :after #'recenter-to-top 667 (:advise forward-page :after #'recenter-to-top
660 backward-page :after #'recenter-to-top) 668 backward-page :after #'recenter-to-top)
661 669