From 8a14c2b07651993bedb870aec216f4b5cc58c8e5 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Sat, 9 Nov 2024 08:41:17 -0500 Subject: [PATCH] Change scroll-conservatively to 10 --- init.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 44deeea..7867b8f 100644 --- a/init.el +++ b/init.el @@ -240,10 +240,14 @@ ;; window. (setq scroll-preserve-screen-position t) -;; Setting `scroll-conservatively' to a high number like 10000 makes Emacs only -;; scroll a little bit to bring your cursor back into view, minimizing -;; unnecessary page movements. -(setq scroll-conservatively 10000) +;; Emacs spends excessive time recentering the screen when the cursor moves more +;; than N lines past the window edges (where N is the value of +;; `scroll-conservatively`). This can be particularly slow in larger files +;; during extensive scrolling. If `scroll-conservatively` is set above 100, the +;; window is never automatically recentered. The default value of 0 triggers +;; recentering too aggressively. Setting it to 10 reduces excessive recentering +;; and only recenters the window when scrolling significantly off-screen. +(setq scroll-conservatively 10) ;; Enables smooth scrolling by making Emacs scroll the window by 1 line whenever ;; the cursor moves off the visible screen.