From 8567ec8bcfce39d4678ac016b00176ae9d5f3bd2 Mon Sep 17 00:00:00 2001 From: Noah Evans Date: Fri, 27 Aug 2021 03:43:19 +0200 Subject: [PATCH] Fix recentering issue in `follow-mode' * lisp/follow.el (follow-recenter): Make `C-c . C-l' work in windows before the middle one, too (bug#50220). Copyright-paperwork-exempt: yes --- lisp/follow.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/follow.el b/lisp/follow.el index dde140d0fd5..b64f4cb7348 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -858,8 +858,11 @@ from the bottom." (windows (follow-all-followers)) (win (nth (/ (- (length windows) 1) 2) windows))) (select-window win) - (goto-char dest) - (recenter)))) + (let ((win-s (window-start))) + (goto-char dest) + (recenter) + (when (< dest win-s) + (setq follow-internal-force-redisplay t)))))) (defun follow-redraw ()