]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-toggle-header): Avoid possibly slow call to
authorRichard M. Stallman <rms@gnu.org>
Wed, 6 Feb 2002 15:00:31 +0000 (15:00 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 6 Feb 2002 15:00:31 +0000 (15:00 +0000)
rmail-count-screen-lines starting from (point-min).

lisp/mail/rmail.el

index 4d3d39d0f0d09f05b7ba5f0cab16e847d3ea451d..2040fa2dad1217be93b9485fb717fceae20dae29 100644 (file)
@@ -2058,12 +2058,7 @@ otherwise, show it in full."
                   (recenter old-screen-line)
                   (if (and all-headers-visible
                            (not (= (window-start) (point-min))))
-                      (let ((lines-offscreen (rmail-count-screen-lines
-                                              (point-min)
-                                              (window-start window))))
-                        (recenter (min (+ old-screen-line lines-offscreen)
-                                       ;; last line of window
-                                       (- (window-height) 2))))))))))
+                      (recenter (- (window-height) 2))))))))
       (rmail-highlight-headers))))
 
 (defun rmail-narrow-to-non-pruned-header ()