comparison lisp/window.el @ 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 29a87f28cd51
children b18c7c71cf2e
comparison
equal deleted inserted replaced
32810:aeecafe2ecd2 32811:4ae3a43dad2d
467 ;; window-min-height. 467 ;; window-min-height.
468 (window-min-height 1)) 468 (window-min-height 1))
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))
477 (enlarge-window delta) 478 (enlarge-window delta)
478 (save-selected-window 479 (save-selected-window