diff options
| author | Kenichi Handa | 2000-10-24 10:52:22 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-10-24 10:52:22 +0000 |
| commit | 2bd8a1db5ef40ae3bde8085779fd2d9014403343 (patch) | |
| tree | 303572c8d5c2ad64bd04e341fb371b4af66240f6 | |
| parent | ae3b264bca218345b90c901eeb56766a8412b7ca (diff) | |
| download | emacs-2bd8a1db5ef40ae3bde8085779fd2d9014403343.tar.gz emacs-2bd8a1db5ef40ae3bde8085779fd2d9014403343.zip | |
(fit-window-to-buffer): Adjust point of the window buffer, not that of
the current buffer.
| -rw-r--r-- | lisp/window.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/window.el b/lisp/window.el index 53d234a3805..92451fb9cd8 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -469,8 +469,9 @@ header-line." | |||
| 469 | 469 | ||
| 470 | ;; Don't try to redisplay with the cursor at the end | 470 | ;; Don't try to redisplay with the cursor at the end |
| 471 | ;; on its own line--that would force a scroll and spoil things. | 471 | ;; on its own line--that would force a scroll and spoil things. |
| 472 | (when (and (eobp) (bolp) (not (bobp))) | 472 | (if (with-current-buffer (window-buffer window) |
| 473 | (forward-char -1)) | 473 | (and (eobp) (bolp) (not (bobp)))) |
| 474 | (set-window-point window (1- (window-point window)))) | ||
| 474 | 475 | ||
| 475 | (unless (zerop delta) | 476 | (unless (zerop delta) |
| 476 | (if (eq window (selected-window)) | 477 | (if (eq window (selected-window)) |