changeset 5151:8b31cff02267

(count-lines): In selective-display case, adjust value if end is not at bol.
author Richard M. Stallman <rms@gnu.org>
date Wed, 24 Nov 1993 04:35:28 +0000
parents 60fa14264c3b
children 67b4642532bb
files lisp/simple.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Wed Nov 24 01:53:58 1993 +0000
+++ b/lisp/simple.el	Wed Nov 24 04:35:28 1993 +0000
@@ -332,7 +332,11 @@
 		(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 ()