]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix ibuffer auto-shrinking windows
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 2 Jun 2021 08:54:37 +0000 (10:54 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 2 Jun 2021 08:54:37 +0000 (10:54 +0200)
* lisp/ibuffer.el (ibuffer-shrink-to-fit): Don't shrink all
windows, just the ibuffer one (bug#7218).

lisp/ibuffer.el

index c80222ed0f40edb1cca0b695e14e58254d1105bf..9088f31053bf47b21ed7552e4b27b61837402a8d 100644 (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."