linux/drivers/tty/vt
Nicolas Pitre 5eb608319b vt: save/restore unicode screen buffer for alternate screen
The alternate screen support added by commit 23743ba647 ("vt: add
support for smput/rmput escape codes") only saves and restores the
regular screen buffer (vc_origin), but completely ignores the corresponding
unicode screen buffer (vc_uni_lines) creating a messed-up display.

Add vc_saved_uni_lines to save the unicode screen buffer when entering
the alternate screen, and restore it when leaving. Also ensure proper
cleanup in reset_terminal() and vc_deallocate().

Fixes: 23743ba647 ("vt: add support for smput/rmput escape codes")
Cc: stable <stable@kernel.org>
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Link: https://patch.msgid.link/5o2p6qp3-91pq-0p17-or02-1oors4417ns7@onlyvoer.pbz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-13 09:15:58 +01:00
..
.gitignore vt: create ucs_fallback_table.h_shipped with gen_ucs_fallback_table.py 2025-05-21 13:39:45 +02:00
Makefile vt: add ucs_get_fallback() 2025-05-21 13:39:45 +02:00
conmakehash.c tty: vt: conmakehash: remove non-portable code printing comment header 2024-08-13 11:06:29 +02:00
consolemap.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cp437.uni tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
defkeymap.c_shipped vt: defkeymap: Map keycodes above 127 to K_HOLE 2025-07-22 18:53:56 +02:00
defkeymap.map tty: fix up a few remaining files without SPDX identifiers 2019-04-04 18:48:43 +02:00
gen_ucs_fallback_table.py vt: process the full-width ASCII fallback range programmatically 2025-05-21 13:39:45 +02:00
gen_ucs_recompose_table.py vt: move UCS tables to the "shipped" form 2025-04-26 11:22:04 +02:00
gen_ucs_width_table.py vt: move UCS tables to the "shipped" form 2025-04-26 11:22:04 +02:00
keyboard.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
selection.c drivers/tty/vt: use umin() instead of min_t(u16, ...) for row/col limits 2025-11-21 18:16:11 +01:00
ucs.c vt: fix kernel-doc warnings in ucs_get_fallback() 2025-06-19 13:27:36 +02:00
ucs_fallback_table.h_shipped vt: process the full-width ASCII fallback range programmatically 2025-05-21 13:39:45 +02:00
ucs_recompose_table.h_shipped vt: move UCS tables to the "shipped" form 2025-04-26 11:22:04 +02:00
ucs_width_table.h_shipped vt: move UCS tables to the "shipped" form 2025-04-26 11:22:04 +02:00
vc_screen.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vt.c vt: save/restore unicode screen buffer for alternate screen 2026-03-13 09:15:58 +01:00
vt_ioctl.c tty/vt: Add missing return value for VT_RESIZE in vt_ioctl() 2025-09-06 15:49:55 +02:00