less icon indicating copy to clipboard operation
less copied to clipboard

PageUp PageDown scrolling over-run under Windows

Open cidbat opened this issue 5 years ago • 4 comments

Under Linux: ls -l -R / | less
produces a large listing which scrolls nicely with PgUp/PgDn

Under Windows 8.1 dir /s \ | less
exhibits horrible over-run if PgUp or PgDn is held down a while and then released.

The same is true of z and w keys, so it is probably not a 2-byte key-cide issue.

cidbat avatar Jun 27 '20 18:06 cidbat

Can you explain what you mean by "over-run"?

gwsw avatar Jun 29 '20 21:06 gwsw

Obviously I meant overrun :-)

Please note my observations are PC and Windows 8.1 x84 specific, using a pre-built version of Less 562.

(On the same machine Less runs fine under Linux under Hyper-V.)

The issue is that scrolling (MOVING in Less-speak) continues LONG after the invoking key is released, and keyboard-auto-repeat has enqueued multiple instances of the invoking key.

When scrolling, if the invoking key is still pressed, Less should discard all buffered keystrokes, and continue to scroll UNTIL the key is released. (You probably need to consider key-codes AND key-state to achieve this.)

It gets worse. The following keys also provoke overrun if held down for a few secods (in meaningful circumstances) and then released:

f ^f b ^b Space ^v z w d ^d u ^u r ^r N n

So, this seems to be a general keyboard handling issue.

I hope this is clearer than my original post.

cidbat avatar Jul 01 '20 22:07 cidbat

I accidentally closed this issue, so I am trying the reopen and comment button ................................

cidbat avatar Jul 01 '20 22:07 cidbat

I have experienced this before, but can't replicate it atm (Windows 10, my own binary and the 563.0 release from the link on the less download page).

adoxa avatar Nov 24 '20 07:11 adoxa

The Windows input key handling code was substantially rewritten in less-645. I cannot reproduce this issue in less-645 or later, so I'm assuming it has been fixed. Please reopen if you can reproduce.

gwsw avatar Nov 19 '23 21:11 gwsw