changeset 99186:d1ef75af2ae2

(follow-scroll-down, follow-calc-win-end) (follow-estimate-first-window-start): Reduce effective window height when header line is present.
author Martin Rudalics <rudalics@gmx.at>
date Tue, 28 Oct 2008 17:35:56 +0000
parents a4d853355dca
children f552fe2942ff
files lisp/follow.el
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/follow.el	Tue Oct 28 11:49:19 2008 +0000
+++ b/lisp/follow.el	Tue Oct 28 17:35:56 2008 +0000
@@ -624,7 +624,7 @@
 	     (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 @@
       (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 @@
       ;(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 @@
 ;; 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 ()