Re: bug in `more -c` when displayed file has blank lines in certain places

Karel Zak <[email protected]>
Newsgroups org.kernel.vger.util-linux
Message-ID <cw62qayece3jj5xxzd4vbhhccdfd2az7ij2vadubzwpsz67nhc@pj4wa2ks7dhs>
On Tue, Mar 18, 2025 at 11:44:25AM +0100, Benno Schulenberg wrote:
> 
> To reproduce, make it so that your terminal has 29 or 35 or 37 rows.
> Then run `./more -c NEWS` and type ? to display the in-app help text.
> (The NEWS file should be the one from util-linux-2.41-rc2.)
> 
> Then type <Space>.  See that the top row still displays the second line
> of the help text: "Star (*) indicates argument becomes new default."
> 
> Somehow `more -c` forgets to clear the top row when the corresponding
> line in the file is blank.
 
I can reproduce this bug. It seems that more(1), when used with -c
(ctl->clear_line_ends in the code), does not clear properly the screen
(after help) if there is an empty line in the file.

    Karel



-- 
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.