ui/console-vc: add support for cursor DECSC and DECRC commands
There are aliases for save and restore cursor commands:
* save cursor
`ESC 7` (DEC Save Cursor [1], older VT100)
`ESC [ s` (CSI Save Cursor, standard ANSI)
* load cursor
`ESC 8` (DEC Restore Cursor [2], older VT100)
`ESC [ u` (CSI Restore Cursor, standard ANSI)
This change introduces older DEC sequencies for compatibility with
some scripts (for example [3]) and tools.
This change also adds saving and restoring of character attributes,
which is according to the VT spec [1][2]
[1] https://vt100.net/docs/vt510-rm/DECSC.html
[2] https://vt100.net/docs/vt510-rm/DECRC.html
[3] https://wiki.archlinux.org/title/Working_with_the_serial_console#Resizing_a_terminal
Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <
20250226075913.353676-5-r.peniaev@gmail.com>