diff options
author | Martin Rudalics <rudalics@gmx.at> | 2021-10-11 18:58:10 +0200 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2021-10-11 18:58:10 +0200 |
commit | d96f8b22c01b330d773cf46eb4c21acbe153633e (patch) | |
tree | d664a3b2f67c2dea347028f51bc8aec95c98ee57 /lisp | |
parent | 665a184f872303c6f86935e856e245be835d5554 (diff) | |
download | emacs-d96f8b22c01b330d773cf46eb4c21acbe153633e.tar.gz emacs-d96f8b22c01b330d773cf46eb4c21acbe153633e.tar.bz2 emacs-d96f8b22c01b330d773cf46eb4c21acbe153633e.zip |
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).
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ibuffer.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 046595a4d90..e5095455c26 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -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) |