]> git.eshelyaron.com Git - emacs.git/commitdiff
(fit-window-to-buffer): Adjust point of the window buffer, not that of
authorKenichi Handa <handa@m17n.org>
Tue, 24 Oct 2000 10:52:22 +0000 (10:52 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 24 Oct 2000 10:52:22 +0000 (10:52 +0000)
the current buffer.

lisp/window.el

index 53d234a3805340755610858a86c8a1f190a752ed..92451fb9cd8a7670f3504840ba00e5a6023d055b 100644 (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))