#1021811 util-linux: "more -ce" mishandles (some) blank lines

Package:
util-linux
Source:
util-linux
Description:
miscellaneous system utilities
Submitter:
Paul Vojta
Date:
2023-08-09 13:39:06 UTC
Severity:
normal
Tags:
#1021811#5
Date:
2022-10-15 07:19:36 UTC
From:
To:
Dear Maintainer,

I get incorrect behavior from "more -ce" in the presence of certain blank lines.

To reproduce:

1.  In a terminal with 66 lines, run "more -ce" on the attached file.
2.  At the "--More--" prompt, press the space bar.
3.  Line 2 of the file incorrectly remains on the screen.

Also, if you type "d" at step 2 instead of the space bar, two blank lines
are shown instead of one.

This happens both with xterm (TERM=xterm) and the Linux console (TERM=linux).

The attached file was created as follows:

1.  ls /bin | head -67 | cat -n > file
2.  Edit the file and replace line 66 with a blank line.

For terminals with n lines instead of 66, replace "66" and "67" in the above
instructions with n and n+1, respectively.