changeset 43124:67ff08aaa0d0

(rmail-toggle-header): Avoid possibly slow call to rmail-count-screen-lines starting from (point-min).
author Richard M. Stallman <rms@gnu.org>
date Wed, 06 Feb 2002 15:00:31 +0000
parents 3349c41a0c5e
children 49ff3106980b
files lisp/mail/rmail.el
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Wed Feb 06 14:59:10 2002 +0000
+++ b/lisp/mail/rmail.el	Wed Feb 06 15:00:31 2002 +0000
@@ -2058,12 +2058,7 @@
 		   (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 ()