changeset 32811:4ae3a43dad2d

(fit-window-to-buffer): Adjust point of the window buffer, not that of the current buffer.
author Kenichi Handa <handa@m17n.org>
date Tue, 24 Oct 2000 10:52:22 +0000
parents aeecafe2ecd2
children c49b460bb280
files lisp/window.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/window.el	Tue Oct 24 10:52:06 2000 +0000
+++ b/lisp/window.el	Tue Oct 24 10:52:22 2000 +0000
@@ -469,8 +469,9 @@
 
     ;; 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))