From f064b23d09a354d7b99bc6eebb4be64979a3ba9f Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 2 Jun 2021 10:54:37 +0200 Subject: [PATCH] Fix ibuffer auto-shrinking windows * lisp/ibuffer.el (ibuffer-shrink-to-fit): Don't shrink all windows, just the ibuffer one (bug#7218). --- lisp/ibuffer.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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." -- 2.39.2