diff options
| author | Karl Heuer | 1999-03-17 04:49:21 +0000 |
|---|---|---|
| committer | Karl Heuer | 1999-03-17 04:49:21 +0000 |
| commit | 2de3834bb50c4609d24aeb6e91195ba29c553c9e (patch) | |
| tree | 85da9e20faa8b3a406e75191cc558a740e771f53 | |
| parent | ec241f58e0d5d01fc340ff8cf42cf43db5bf22e1 (diff) | |
| download | emacs-2de3834bb50c4609d24aeb6e91195ba29c553c9e.tar.gz emacs-2de3834bb50c4609d24aeb6e91195ba29c553c9e.zip | |
(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.
| -rw-r--r-- | lisp/window.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/window.el b/lisp/window.el index cd043e0d47e..6010f894791 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -278,6 +278,10 @@ or if the window is the only window of its frame." | |||
| 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))))))))) |