bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35943: 26.2; `count-lines-page' gives wrong line count (off by one)


From: Stefan Kangas
Subject: bug#35943: 26.2; `count-lines-page' gives wrong line count (off by one)
Date: Tue, 28 May 2019 14:40:11 +0200

There seems to be an off by one error in `count-lines-page'.

Steps to reproduce:

1. Run emacs -Q

2. Evaluate the following in the scratch buffer:

(with-temp-buffer
  (insert "Page 1/3
^L
Page 2/3
^L
Page 3/3")
  (forward-page)
  (count-lines-page))

NB. Convert "^L" to the actual control characters.

3. Result:

"Page has 2 lines (2 + 0)"

4. Expected result:

"Page has 1 lines (1 + 0)"

Thanks,
Stefan Kangas

In GNU Emacs 26.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2019-04-13 built on joffe
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description:    Debian GNU/Linux 9.9 (stretch)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]