diff lisp/minibuf.el @ 4384:c7e65155cb35

Improve upon previous patch to minibuf.el. 2008-01-02 Mike Sperber <mike@xemacs.org> * minibuf.el (mouse-read-file-name-1): Use `window-height' instead of `frame-height' to be consistent with `split-window''s calculations. Bind `window-min-height' to 1 for the entire interaction to avoid various "window-too-small"-type problems.
author Mike Sperber <sperber@deinprogramm.de>
date Sat, 05 Jan 2008 16:13:04 +0100
parents 53e507d77416
children 9a1a59b4b75d
line wrap: on
line diff
--- a/lisp/minibuf.el	Thu Jan 03 22:36:04 2008 +0100
+++ b/lisp/minibuf.el	Sat Jan 05 16:13:04 2008 +0100
@@ -2060,18 +2060,15 @@
 	 (butbuf (generate-new-buffer " *mouse-read-file-buttons*"))
 	 (frame (make-dialog-frame))
 	 filewin dirwin
-	 user-data)
+	 user-data
+	 (window-min-height 1)) ; allow button window to be height 2
     (unwind-protect
 	(progn
 	  (reset-buffer filebuf)
 
 	  ;; set up the frame.
 	  (focus-frame frame)
-	  ;; We really need `window-min-height' lines for the button
-	  ;; buffer, as otherwise the button buffer might get
-	  ;; inadvertently deleted when other window-size changes
-	  ;; happen (such as through resize-minibuffer-mode).
-	  (split-window nil (- (frame-height frame) window-min-height))
+	  (split-window nil (- (window-height) 2))
 	  (if file-p
 	      (progn
 		(split-window-horizontally 16)