From 5412419465dbb3e12d0841ab15875fa34ca6f336 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Wed, 8 Oct 2008 05:03:43 +0000 Subject: [PATCH] ibuffer: Fix issue with ERC scroll-to-bottom (Bug #858). --- lisp/ChangeLog | 6 ++++++ lisp/ibuffer.el | 3 +++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 34540d598d2..94ffd1fab54 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-10-08 Michael Olson + + * ibuffer.el (ibuffer-shrink-to-fit): Force redisplay, so that we + can avoid a bad interaction with programs that add functions to + the window-scroll-functions hook. This fixes Bug #858. + 2008-10-07 Chong Yidong * startup.el (command-line): Use display-warning to warn about an diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 539f88ec3c1..262f2ad73ab 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1153,6 +1153,9 @@ a new window in the current frame, splitting vertically." (ibuffer-redisplay t))) (defun ibuffer-shrink-to-fit (&optional owin) + ;; Make sure that redisplay is performed, otherwise there can be a + ;; bad interaction with code in the window-scroll-functions hook + (redisplay t) (fit-window-to-buffer nil (when owin (/ (frame-height) (length (window-list (selected-frame))))))) -- 2.39.5