[Toybox] hexedit uses VT-420 scroll ctrl sequences which dont work on tty1
Rob Landley
rob at landley.net
Mon Sep 23 18:43:41 PDT 2019
On 9/23/19 4:02 PM, Jarno Mäkipää wrote:
> Hey
>
> I was looking at how should I limit unchanged lines being rewritten
> every keypress in vi editor.
> So I look reference in hexedit and noticed that it does not work
> properly on virtual terminals
> (one that open with ctrl+alt+f1...)
>
> hexedit seems to use esc[1S and esc[1T for scrolling and found them in here
>
> https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
http://man7.org/linux/man-pages/man4/console_codes.4.html
> CSI Ps S Scroll up Ps lines (default = 1) (SU), VT420, ECMA-48.
> CSI Ps T Scroll down Ps lines (default = 1) (SD), VT420.
>
> While most of the time its not really issue, since people run X or
> have ssh/telnet or serial connection from other device with proper
> terminal emulator. But in those rare case when you have keyboard and
> framebuffer console and just messed up that one byte in your file it
> might come handy to be able fix it.
>
> Is there any easy way checking if terminal currently running supports
> these?
In theory there's the "TERM" environment variable, in practice it's essentially
useless.
> Or should I just ignore and use them anyway, perhaps have :set
> something to disable them?
I'll see if I can send a patch to Linux to fix the text console. It worked on
the actual VGA system hardware I tested it on, but my new laptop has a frame
buffer for the text console and it doesn't work there.
Rob
More information about the Toybox
mailing list