From 6ad0efeee6cce4fdaa0fd42f79a8273fd7b8ce75 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 11 Aug 2021 22:04:41 -0500 Subject: Recenter cursor on page after navigating pages --- init.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/init.el b/init.el index c6370a0..6938282 100644 --- a/init.el +++ b/init.el @@ -605,6 +605,13 @@ like a dumbass." (minibuffer-electric-default-mode +1) (fset 'yes-or-no-p #'y-or-n-p)) +(setup page + (defun recenter-to-top (&rest _args) + "Recenter the cursor to the top of the window." + (recenter 0)) + (:advise forward-page :after #'recenter-to-top + backward-page :after #'recenter-to-top)) + (setup prog (:option smie-indent-basic tab-width) -- cgit 1.4.1-21-gabe81