gwsw / less

Less - text pager
http://greenwoodsoftware.com/less
Other
548 stars 87 forks source link

Last page vs. eyeball position #31

Closed jidanni closed 3 years ago

jidanni commented 4 years ago

Problem: I'm using

# tr \\0 \\n < /proc/2195/environ|grep LESS|sed s/\ .*//
LESS=-ix8RmPm
SYSTEMD_LESS=-iRXQM
MAN_ORIG_LESS=-iRXQM
LESSCHARSET=utf-8

or whatever, which I'm quite happy with.

The problem always comes on the last page. E.g., on page 8 of a 8 page document.

There the user (me) eyeballs go to the top of the screen, which is actually page 7.48 etc. thinking it is the top of page 8.

But yes, I still want less to show me the last page that way. I.e., I don't want to "waste" my expensive computer screen with empty space or "EOF tilde lines" when I could be still looking at a full page.

Therefore less should also be able to:

Anyway the man page should discuss the "special difficulties with final pages".

less 551

gwsw commented 4 years ago

Hi Dan, I'm not sure I understand your "white line" proposal -- is it different than what the -w flag does?

jidanni commented 4 years ago

Hmmm, -w, must be new.

Wait! -w is powerless to deal with blank lines! No characters to highlight, so no highlighting. Bad...

Anyway I was thinking of a thinner white line anyway, as thick as an underline. Perhaps allow that as an alternative to highlighting, and do it even if there is nothing to underline -- at a standard width of 80...

And maybe some folks want all this stuff to only turn on if we are on the last page... (However the user would probably think it was part of the original document, as he would forget that highlighting etc. was in effect... so have it say "--LESS LAST PAGE--" etc.)

gwsw commented 4 years ago

Yes, -w is new. It was added in 1999. :-)

If you enable the status column (-J) you will see the page mark even if the line is empty.

jidanni commented 4 years ago

But at a price of shoving all the lines over...

gwsw commented 3 years ago

As of 5c20a6108472fc7f636ff08f7606f02a06b335c6, the highlight will appear even if the highlighted line is empty.