gwsw / less

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

Erroneous behavior if partial command is followed by another command #543

Open gwsw opened 1 month ago

gwsw commented 1 month ago

Steps to reproduce:

  1. Run less in an xterm window.
  2. Enter G.
  3. Enter :.
  4. 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.

gwsw commented 1 month ago

Should be fixed in 6a6aa61f75ecfdded373ac0c49e21764d7ae7dad.