# HG changeset patch # User Mike Sperber # Date 1199264887 -3600 # Node ID 53e507d77416adad6ce72e66fb4b7f8848fa993b # Parent 74e0e1131e011672c4512111c51ef3795e4bf995 Fix problem with file dialog box. 2008-01-02 Mike Sperber * minibuf.el (mouse-read-file-name-1): Make the buttons in the dialog frame occupy `window-min-height' lines to avoid problems when the window configuration changes---as it does with `resize-minibuffer-mode'. diff -r 74e0e1131e01 -r 53e507d77416 lisp/ChangeLog --- a/lisp/ChangeLog Wed Jan 02 10:12:04 2008 +0100 +++ b/lisp/ChangeLog Wed Jan 02 10:08:07 2008 +0100 @@ -1,3 +1,10 @@ +2008-01-02 Mike Sperber + + * minibuf.el (mouse-read-file-name-1): Make the buttons in the + dialog frame occupy `window-min-height' lines to avoid problems + when the window configuration changes---as it does with + `resize-minibuffer-mode'. + 2007-12-31 Aidan Kehoe * menubar-items.el (default-menubar): diff -r 74e0e1131e01 -r 53e507d77416 lisp/minibuf.el --- a/lisp/minibuf.el Wed Jan 02 10:12:04 2008 +0100 +++ b/lisp/minibuf.el Wed Jan 02 10:08:07 2008 +0100 @@ -2057,7 +2057,7 @@ (let* ((file-p (eq 'read-file-name-internal completer)) (filebuf (get-buffer-create "*Completions*")) (dirbuf (and file-p (generate-new-buffer " *mouse-read-file*"))) - (butbuf (generate-new-buffer " *mouse-read-file*")) + (butbuf (generate-new-buffer " *mouse-read-file-buttons*")) (frame (make-dialog-frame)) filewin dirwin user-data) @@ -2067,12 +2067,11 @@ ;; set up the frame. (focus-frame frame) - (let ((window-min-height 1)) - ;; #### should be 2 not 3, but that causes - ;; "window too small to split" errors for some - ;; people (but not for me ...) There's a more - ;; fundamental bug somewhere. - (split-window nil (- (frame-height frame) 3))) + ;; 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)) (if file-p (progn (split-window-horizontally 16)