From: Lars Ingebrigtsen Date: Wed, 2 Jun 2021 08:54:37 +0000 (+0200) Subject: Fix ibuffer auto-shrinking windows X-Git-Tag: emacs-28.0.90~2221 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f064b23d09a354d7b99bc6eebb4be64979a3ba9f;p=emacs.git Fix ibuffer auto-shrinking windows * lisp/ibuffer.el (ibuffer-shrink-to-fit): Don't shrink all windows, just the ibuffer one (bug#7218). --- diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index c80222ed0f4..9088f31053b 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1079,8 +1079,11 @@ a new window in the current frame, splitting vertically." ;; 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))))))) + (when (buffer-local-value 'ibuffer-auto-mode (window-buffer)) + (fit-window-to-buffer + nil (and owin + (/ (frame-height) + (length (window-list (selected-frame)))))))) (defun ibuffer-confirm-operation-on (operation names) "Display a buffer asking whether to perform OPERATION on NAMES."