Hi Yoshio,
Thanks for your persistent following up.
The unstable version that I got is already v443. So I installed and tested
it, and it seems to be working as I expected. Here is what man page says
about -j:
,-----
| -jn specifies a line on the screen where the "target" line is to
| be positioned. The target line is the line specified by any
| command to search for a pattern, jump to a line number, jump to a
| file percentage or jump to a tag. . .
|
| The number may be negative to specify a line relative to the
| bottom of the screen: the bottom line on the screen is -1, the
| second to the bottom is -2, and so on.
`-----
This is how I tested:
seq 100 > /tmp/l
less -j-6 /tmp/l
then search for, eg, 22, 33, etc. I found the highlighted line to be the 6th
line to the bottom of the screen.
So, yeah, IMO, the bug can be closed.
Thanks again.
FYI:
$ apt-cache policy less
less:
Installed: 443-1
Candidate: 443-1
Version table:
*** 443-1 0
50 http://cdn.debian.net/debian/ unstable/main amd64 Packages
100 /var/lib/dpkg/status
436-1 0
500 http://cdn.debian.net/debian/ squeeze/main amd64 Packages
On Sun, Apr 17, 2011 at 9:48 PM, Yoshio Nakamura <[email protected]>wrote:
> package less
> submitter 498746 Tong Sun <[email protected]>
> thanks
>
> Hi Tong,
>
> The release notes for less version 440
> http://www.greenwoodsoftware.com/less/news.440.html notes:
>
> Version 440 was released on 5 Jan 2011.
>
> These are the differences between version 436 and version 440:
>
> Add -A option to change search behavior such that when a search is
> given an explicit pattern, the entire displayed screen is included in
> the search and not just the portion after the target line.
> Add %F formatting to prompt strings, replaced by the last
> component of the input file.
> Less now exits with status 2 if control-C is pressed and -K is in
> effect.
> Fix "ungetc overflow" when passing long commands via the -p option.
> Fix bug in using line filtering via the & command in combination
> with -i and -I.
> ******** Fix bug in handling negative arguments to the -j option.
> Fix bug in handling %t in prompt strings.
> Improve handling of long option names.
> Improve percentage calculation for very large files.
>
> It says the negative arguments to the -j option was fixed, but I
> grabbed the source from unstable with:
> apt-get source less/unstable
> (assume that you have the sources for unstable in your
> /etc/apt/sources.list) and compiling the source and testing seems to
> not result in what I expected. Can you test the new version, and see
> if it is fixed?
>
> By the way, if you send email to [email protected] with the text
> "submitter 498746 Tong Sun <[email protected]>", you can change the
> email address of the bug submitter. See
> http://www.debian.org/Bugs/server-control .
>
> thanks,
> Yoshio
>