From: Richard M. Stallman Date: Wed, 24 Nov 1993 04:35:28 +0000 (+0000) Subject: (count-lines): In selective-display case, X-Git-Tag: emacs-19.34~10700 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=043efc41eb942f4712b83bf93f4193767ff842b5;p=emacs.git (count-lines): In selective-display case, adjust value if end is not at bol. --- diff --git a/lisp/simple.el b/lisp/simple.el index e6a24cb49a1..85557739654 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -332,7 +332,11 @@ and the greater of them is not at the start of a line." (setq done (+ 40 done))) (while (re-search-forward "[\n\C-m]" nil t 1) (setq done (+ 1 done))) - done) + (goto-char (point-max)) + (if (and (/= start end) + (not (bolp))) + (1+ done) + done)) (- (buffer-size) (forward-line (buffer-size)))))))) (defun what-cursor-position ()