From 696a4e03bf1e4ffaf6cf502f2cb6514eeab6fa59 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 14 Mar 2026 13:11:11 +0200 Subject: [PATCH] Fix backward motion in Info manuals under 'scroll-conservatively' * lisp/info.el (Info-find-node-2): Don't skip the header or breadcrumbs line when 'scroll-conservatively' is set to a value that could leave the beginning of the node outside of the window. (Bug#80553) --- lisp/info.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/info.el b/lisp/info.el index 8d1aadd34c6..368255092a1 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1343,7 +1343,13 @@ is non-nil)." (Info-select-node) (goto-char (point-min)) - (forward-line 1) ; skip header line + ;; Skip the header line or breadcrumbs, unless + ;; 'scroll-conservatively' is set to a large enough value + ;; which could cause us scroll the display to leave that + ;; line outside of the window. The shortest node is 5 + ;; lines, thus 6 is the threshold value. + (if (< scroll-conservatively 6) + (forward-line 1)) ;; (when (> Info-breadcrumbs-depth 0) ; skip breadcrumbs line ;; (forward-line 1))