1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(fit-window-to-buffer): Adjust point of the window buffer, not that of

the current buffer.
This commit is contained in:
Kenichi Handa 2000-10-24 10:52:22 +00:00
parent ae3b264bca
commit 2bd8a1db5e

View file

@ -469,8 +469,9 @@ header-line."
;; 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)))
(forward-char -1))
(if (with-current-buffer (window-buffer window)
(and (eobp) (bolp) (not (bobp))))
(set-window-point window (1- (window-point window))))
(unless (zerop delta)
(if (eq window (selected-window))