Fix ibuffer auto-shrinking windows

* lisp/ibuffer.el (ibuffer-shrink-to-fit): Don't shrink all
windows, just the ibuffer one (bug#7218).
This commit is contained in:
Lars Ingebrigtsen 2021-06-02 10:54:37 +02:00
parent 7ea7e26ab1
commit f064b23d09

View file

@ -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."