Mercurial > emacs
changeset 24492:46906de4c968
(shrink-window-if-larger-than-buffer):
Don't try to redisplay with the cursor at the end
on its own line--that would force a scroll and spoil things.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 17 Mar 1999 04:49:21 +0000 |
parents | 45b77df0b5ac |
children | 8cc1b3739d56 |
files | lisp/window.el |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/window.el Tue Mar 16 14:18:40 1999 +0000 +++ b/lisp/window.el Wed Mar 17 04:49:21 1999 +0000 @@ -278,6 +278,10 @@ (> (nth 1 edges) (cdr (assq 'menu-bar-lines params))))) (let ((text-height (window-buffer-height window)) (window-height (window-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)) + (forward-char -1)) (when (> window-height (1+ text-height)) (shrink-window (- window-height (max (1+ text-height) window-min-height)))))))))