[Bug 7586] New: less -M total number of lines and percentage wrong (before jumping to bottom)

bugzilla at busybox.net bugzilla at busybox.net
Sat Nov 1 01:56:25 UTC 2014


https://bugs.busybox.net/show_bug.cgi?id=7586

           Summary: less -M total number of lines and percentage wrong
                    (before jumping to bottom)
           Product: Busybox
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Standard Compliance
        AssignedTo: unassigned at busybox.net
        ReportedBy: Explorer09 at gmail.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


$ seq 1 100 >seq.txt
$ less -M seq.txt

Status line says:
"seq.txt lines 1-23/100 21%"
Press 'q'

$ busybox less -M seq.txt

Status line says:
"seq.txt lines 1-23/24 96%"
                    ^^ ^^^ (Not 100 lines)
Press 'q'

$ seq 1 100 | less -M

"lines 1-23"
Press '>' and then press '<':
"lines 1-23/100 21%"
Press 'q'

$ seq 1 100 | busybox less -M

"standard input lines 1-23/24 96%"
                           ^^ ^^^
The total number of lines and percentage shouldn't be shown if stdin wasn't
finished reading (i.e. no EOF encountered yet).
Press '>' and then press '<':
"standard input lines 1-23/101 23%"
                           ^^^
('vi' and GNU 'less' say 100. I'm not complaining about this off-by-one, but it
could be a separate bug report.)

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list