ismail-yilmaz / Bobcat

A cross-platform terminal emulator, using TerminalCtrl & U++
GNU General Public License v3.0
17 stars 1 forks source link

End doesn't work in less #6

Closed dolik-rce closed 8 months ago

dolik-rce commented 8 months ago

Steps to reproduce:

  1. Open long enough file with less
  2. Press End

Expected behavior:

Less scrolls to the end of file.

Actual behavior:

Nothing happens.

Additional info:

Pressing end while editing command in bash works fine. I only noticed this problem in less so far.

My less is version 643.

ismail-yilmaz commented 8 months ago

Steps to reproduce:

1. Open long enough file with `less`

2. Press `End`

Expected behavior:

Less scrolls to the end of file.

Actual behavior:

Nothing happens.

Additional info:

Pressing end while editing command in bash works fine. I only noticed this problem in less so far.

My less is version 643.

Thank you very much for the bug report. Indeed, this is a good catch. Apparently a regression in TerminalCtrl's PC-style key handling function. It turns out that in PC style key handling function the DECKPAM flag was ignored for HOME/END keys, after the code was refactored. Hopefully it is fixed in the upstream. Please update the TerminalCtrl.

dolik-rce commented 8 months ago

I have rebuild Bobcat with updated dependencies and it works now, thanks!

One thing to note: It only works with PC-style function keys enabled. So it really might be a good idea to make it default, as you mentioned in #5.

ismail-yilmaz commented 8 months ago

Thank you very much for the confirmation.

One thing to note: It only works with PC-style function keys enabled. So it really might be a good idea to make it default, as you mentioned in #5.

Yes, and it is intended to be that way, I'm making the PC style default from now on.

Background: VT/PC key toggle is an advanced feature that you can find only on xterm and its derivatives. VT keys mean, VT >= VT220 keyboard. It is not implemented by the most modern TEs out there, but really useful if you are working with old software (which, I do). TerminalCtrl, being as compatible as possible with xterm, implements it. This needs to be in documentation though.