From: Noah Evans Date: Fri, 27 Aug 2021 01:43:19 +0000 (+0200) Subject: Fix recentering issue in `follow-mode' X-Git-Tag: emacs-28.0.90~1295 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8567ec8bcfce39d4678ac016b00176ae9d5f3bd2;p=emacs.git 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 --- 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 ()