comparison lisp/window.el @ 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 19e23f0e3cd3
children 651362fe2962
comparison
equal deleted inserted replaced
24491:45b77df0b5ac 24492:46906de4c968
276 (or (not mini) 276 (or (not mini)
277 (< (nth 3 edges) (nth 1 (window-edges mini))) 277 (< (nth 3 edges) (nth 1 (window-edges mini)))
278 (> (nth 1 edges) (cdr (assq 'menu-bar-lines params))))) 278 (> (nth 1 edges) (cdr (assq 'menu-bar-lines params)))))
279 (let ((text-height (window-buffer-height window)) 279 (let ((text-height (window-buffer-height window))
280 (window-height (window-height))) 280 (window-height (window-height)))
281 ;; Don't try to redisplay with the cursor at the end
282 ;; on its own line--that would force a scroll and spoil things.
283 (when (and (eobp) (bolp))
284 (forward-char -1))
281 (when (> window-height (1+ text-height)) 285 (when (> window-height (1+ text-height))
282 (shrink-window 286 (shrink-window
283 (- window-height (max (1+ text-height) window-min-height))))))))) 287 (- window-height (max (1+ text-height) window-min-height)))))))))
284 288
285 (defun kill-buffer-and-window () 289 (defun kill-buffer-and-window ()