Commit 5e2ec73e authored by Karl Heuer's avatar Karl Heuer
Browse files

(shrink-window-if-larger-than-buffer): Don't shrink if the window that would

expand is the minibuffer.
parent b5b4d636
......@@ -156,9 +156,16 @@ or if the window is the only window of its frame."
(window-min-height 0)
(buffer-read-only nil)
(modified (buffer-modified-p))
(buffer (current-buffer)))
(buffer (current-buffer))
(mini (cdr (assq 'minibuffer (frame-parameters))))
(edges (window-edges (selected-window))))
(if (and (< 1 (count-windows))
(pos-visible-in-window-p (point-min) window))
(pos-visible-in-window-p (point-min) window)
(or (not mini)
(< (nth 3 edges)
(nth 1 (window-edges mini)))
(> (nth 1 edges)
(cdr (assq 'menu-bar-lines (frame-parameters))))))
(select-window (or window w))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment