]> git.eshelyaron.com Git - emacs.git/commitdiff
(dired-pop-to-buffer): Call with min-height arg 1 to
authorMartin Rudalics <rudalics@gmx.at>
Thu, 11 Dec 2008 17:20:45 +0000 (17:20 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Thu, 11 Dec 2008 17:20:45 +0000 (17:20 +0000)
make sure that small buffers get shown.

lisp/ChangeLog
lisp/dired.el

index 50c8570d848d2b020c0be1452f743409f7a3cc2a..e06a7617c42bb2d03de0d33cca0589e1f0d18948 100644 (file)
@@ -1,3 +1,12 @@
+2008-12-11  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (fit-window-to-buffer): Use with-selected-window and
+       condition-case.  Do not delete more windows than necessary in
+       the shrinking (delta < 0) case.  Do not raise an error when the
+       containing frame is too small to show all of buffer.  (Bug#1488)
+       * dired.el (dired-pop-to-buffer): Call fit-window-to-buffer with
+       min-height arg 1 to make sure that small buffers are shown.
+
 2008-12-11  Juanma Barranquero  <lekktu@gmail.com>
 
        * progmodes/ruby-mode.el (ruby-mode-abbrev-table, ruby-mode-map)
index 5d0db7ecc1d30d31a4723223d21380e296192f83..e0e72a1847ead339942b32aa4b00cf11cb9bf6d1 100644 (file)
@@ -2681,7 +2681,9 @@ name, or the marker and a count of marked files."
   (pop-to-buffer (get-buffer-create buf))
   ;; If dired-shrink-to-fit is t, make its window fit its contents.
   (when dired-shrink-to-fit
-    (fit-window-to-buffer (get-buffer-window buf))))
+    ;; Try to not delete window when we want to display less than
+    ;; `window-min-height' lines.
+    (fit-window-to-buffer (get-buffer-window buf) nil 1)))
 
 (defcustom dired-no-confirm nil
   "A list of symbols for commands Dired should not confirm.