Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--no-number-headers does not work correctly if header line is not at the start of the file #566

Closed
gwsw opened this issue Sep 2, 2024 · 1 comment

Comments

@gwsw
Copy link
Owner

gwsw commented Sep 2, 2024

Steps to reproduce:

  1. Run seq 100 | less -N --no-number-headers
  2. Enter 10j
  3. Enter --header=1

Expected result:
First lines on the screen should be

    11
  1 12
  2 13
  3 14

Actual result:
First lines on the screen are

 10 11
 11 12
 12 13
 13 14
gwsw added a commit that referenced this issue Sep 3, 2024
Calculation in vlinenum was assuming header starts at position 0.
Related to #566.
@gwsw
Copy link
Owner Author

gwsw commented Sep 3, 2024

Fixed in 47a7b8e in the post659 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant