]> git.eshelyaron.com Git - emacs.git/commitdiff
(follow-scroll-down, follow-calc-win-end)
authorMartin Rudalics <rudalics@gmx.at>
Tue, 28 Oct 2008 17:36:34 +0000 (17:36 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Tue, 28 Oct 2008 17:36:34 +0000 (17:36 +0000)
(follow-estimate-first-window-start): Reduce effective window
height when header line is present.

lisp/ChangeLog
lisp/follow.el

index e25b20166981ed89ee49aa67a915d426c97db8a1..aa2c4180ff38bf7cca701d0bbe37d6ef729918f4 100644 (file)
@@ -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
index 508d0f539ee31dcfdd99bb9bd9c7a2a5894b99c6..61ede230be121d5ffde31b3678440d43a9a5e845 100644 (file)
@@ -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 ()