1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00

Another fix for 'ibuffer-shrink-to-fit' (Bug#7218, Bug#51029)

* lisp/ibuffer.el (ibuffer-shrink-to-fit): Fit window only if its
buffer is in 'ibuffer-mode' (Bug#7218, Bug#51029).
This commit is contained in:
Martin Rudalics 2021-10-11 18:58:10 +02:00
parent 665a184f87
commit d96f8b22c0

View File

@ -1079,8 +1079,8 @@ 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)
(when (and (boundp 'ibuffer-auto-mode) ; ibuf-ext.el might not be loaded yet
(buffer-local-value 'ibuffer-auto-mode (window-buffer)))
(when (with-current-buffer (window-buffer)
(eq major-mode 'ibuffer-mode))
(fit-window-to-buffer
nil (and owin
(/ (frame-height)