From 4d0e7fe37b6b109cb0f93ea00b0a243289d99cb5 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Thu, 11 Dec 2008 17:20:45 +0000 Subject: [PATCH] (dired-pop-to-buffer): Call with min-height arg 1 to make sure that small buffers get shown. --- lisp/ChangeLog | 9 +++++++++ lisp/dired.el | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 50c8570d848..e06a7617c42 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2008-12-11 Martin Rudalics + + * 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 * progmodes/ruby-mode.el (ruby-mode-abbrev-table, ruby-mode-map) diff --git a/lisp/dired.el b/lisp/dired.el index 5d0db7ecc1d..e0e72a1847e 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -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.