# HG changeset patch # User Mike Sperber # Date 1199545984 -3600 # Node ID c7e65155cb355f52c9766b4dc292402297383fda # Parent 1e04b9c8125bd4bcd89d56b366d3990bc1032adf Improve upon previous patch to minibuf.el. 2008-01-02 Mike Sperber * 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. diff -r 1e04b9c8125b -r c7e65155cb35 lisp/ChangeLog --- a/lisp/ChangeLog Thu Jan 03 22:36:04 2008 +0100 +++ b/lisp/ChangeLog Sat Jan 05 16:13:04 2008 +0100 @@ -23,6 +23,13 @@ 2008-01-02 Mike Sperber + * 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' for the whole thing to + avoid geometry problems with the buttons window. + +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 diff -r 1e04b9c8125b -r c7e65155cb35 lisp/minibuf.el --- 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)