diff options
author | Martin Rudalics <rudalics@gmx.at> | 2008-10-28 17:36:34 +0000 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2008-10-28 17:36:34 +0000 |
commit | 99dfcc0d5280940b5e210b910e4146d1c7f1ad29 (patch) | |
tree | 4a991869371a00b9654614546cc079e7d352bec3 /lisp | |
parent | 4ab2b63c9946148b93555f709dff844b37251384 (diff) | |
download | emacs-99dfcc0d5280940b5e210b910e4146d1c7f1ad29.tar.gz |
(follow-scroll-down, follow-calc-win-end)
(follow-estimate-first-window-start): Reduce effective window
height when header line is present.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/follow.el | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e25b2016698..aa2c4180ff3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-10-28 Phil Sung <psung@mit.edu> (tiny change) + + * follow.el (follow-scroll-down, follow-calc-win-end) + (follow-estimate-first-window-start): Reduce effective window + height when header line is present. + 2008-10-28 Juanma Barranquero <lekktu@gmail.com> * subr.el (locate-user-emacs-file): Simplify. Don't create diff --git a/lisp/follow.el b/lisp/follow.el index 508d0f539ee..61ede230be1 100644 --- a/lisp/follow.el +++ b/lisp/follow.el @@ -624,7 +624,7 @@ Works like `scroll-up' when not in Follow mode." (select-window win) (goto-char start) (vertical-motion (- (- (window-height win) - 1 + (if header-line-format 2 1) next-screen-context-lines))) (set-window-start win (point)) (goto-char start) @@ -887,7 +887,9 @@ Returns (end-pos end-of-buffer-p)" (prog1 (save-excursion (goto-char (window-start)) - (setq height (- (window-height) 1)) + (setq height + (- (window-height) + (if header-line-format 2 1))) (setq buffer-end-p (if (bolp) (not (= height (vertical-motion height))) @@ -1219,7 +1221,9 @@ position of the first window. Otherwise it is a good guess." ;(setq exact (bolp)) (vertical-motion 0 win) (while pred - (vertical-motion (- 1 (window-height (car pred))) (car pred)) + (vertical-motion + (- (if header-line-format 2 1) + (window-height (car pred))) (car pred)) (if (not (bolp)) (setq exact nil)) (setq pred (cdr pred))) @@ -1353,7 +1357,7 @@ non-first windows in Follow mode." ;; the screen if it should be unaligned. ;; ;; We divide the check into two parts; whether we are at the end or not. -;; This is due to the fact that the end can actaually be visible +;; This is due to the fact that the end can actually be visible ;; in several window even though they are aligned. (defun follow-post-command-hook () |