Bug 49791 - less-358-16 (less 358+iso247) fails to number lines with -N
Summary: less-358-16 (less 358+iso247) fails to number lines with -N
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: less   
(Show other bugs)
Version: 7.1
Hardware: i686 Linux
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Aaron Brown
Depends On:
TreeView+ depends on / blocked
Reported: 2001-07-23 22:09 UTC by Max
Modified: 2007-04-18 16:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-25 19:36:29 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Max 2001-07-23 22:09:08 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; NetBSD 1.4.2 i386)

Description of problem:
Running less with the -N option only indents lines with 2 spaces, without
any line numbers prepended.

How reproducible:

Steps to Reproduce:
1. Run /usr/bin/less -N /etc/hosts

Actual Results:  Contents of /etc/hosts are printed with 2 spaces prended
on each line:

  # Do not remove the following line, or various programs
  # that require network functionality will fail.               rebecca localhost.localdomain localhost

Expected Results:  file should have been printed out with line number

       1 # Do not remove the following line, or various programs
       2 # that require network functionality will fail.
       3               rebecca localhost.localdomain localhost

Additional info:

Comment 1 Telsa Gwynne 2001-08-16 14:17:23 UTC
I don't have RH 7.1. 

This bug is not present on my RH 7.0 box. It is present on the Roswell beta

Comment 2 Need Real Name 2001-09-25 19:36:24 UTC
The i18n patch is botching up line numbers. This patch will fix that:

--- less-358/line.c     Tue Sep 25 13:44:44 2001
+++ less-358_/line.c    Tue Sep 25 13:47:40 2001
@@ -153,8 +153,10 @@
                sprintf(&linebuf[curr], "%*d", LINENUM_WIDTH, lno);
                column += LINENUM_WIDTH;
                for (i = 0;  i < LINENUM_WIDTH;  i++)
+               {
                        charset[curr] = ASCII;
                        attr[curr++] = AT_NORMAL;
+               }
         * Append enough spaces to bring us to the lmargin.

Comment 3 Karsten Hopp 2001-10-05 10:13:34 UTC
Thanks for the report and the fix !

Note You need to log in before you can comment on or make changes to this bug.