diff options
Diffstat (limited to 'lisp/window.el')
| -rw-r--r-- | lisp/window.el | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/window.el b/lisp/window.el index 81d35cef894..31735c093f5 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -344,8 +344,7 @@ or if the window is the only window of its frame." (if window (select-window window) (setq window (selected-window))) - (let* ((params (frame-parameters)) - (mini (cdr (assq 'minibuffer params))) + (let* ((mini (frame-parameter nil 'minibuffer)) (edges (window-edges))) (if (and (< 1 (count-windows)) (= (window-width) (frame-width)) @@ -353,12 +352,19 @@ or if the window is the only window of its frame." (not (eq mini 'only)) (or (not mini) (< (nth 3 edges) (nth 1 (window-edges mini))) - (> (nth 1 edges) (cdr (assq 'menu-bar-lines params))))) + (> (nth 1 edges) (frame-parameter nil 'menu-bar-lines)))) ;; `count-screen-lines' always works on the current buffer, so ;; make sure it is the buffer displayed by WINDOW. (let ((text-height (with-current-buffer (window-buffer window) (count-screen-lines))) (window-height (window-height))) + ;; This is a workaround that adds 1 line to the window + ;; if windows have a 3D mode-line. What's really needed + ;; is to get rid of the line-based computations. We don't + ;; have the infrastructure for doing so, yet. + (when (and (display-graphic-p) + (face-attribute 'mode-line :box)) + (setq text-height (1+ text-height))) ;; Don't try to redisplay with the cursor at the end ;; on its own line--that would force a scroll and spoil things. (when (and (eobp) (bolp) (not (bobp))) |
