less
less copied to clipboard
Erroneous behavior if partial command is followed by another command
Steps to reproduce:
- Run less in an xterm window.
- Enter
G. - Enter
:. - Press
HOME.
Expected:
The : should be ignored and the HOME key should jump to the start of the file.
Actual: The help file is opened.
Explanation: On an xterm, HOME maps to "\eOH". When less sees the sequence ":\e" it treats it as a bad command and discards both characters. Then it processes the "O" and the "H" as separate commands.
Discovered while investigating #523.
Should be fixed in 6a6aa61f75ecfdded373ac0c49e21764d7ae7dad.