]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vt: save/restore unicode screen buffer for alternate screen
authorNicolas Pitre <npitre@baylibre.com>
Tue, 27 Jan 2026 22:56:01 +0000 (17:56 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Mar 2026 08:15:58 +0000 (09:15 +0100)
commit5eb608319bb56464674a71b4a66ea65c6c435d64
tree05a2a6678533792992d43c01c9cf4f8d2635aeb3
parenta7b9ce39fbe4ae2919fe4f7ac16c293cb6632d30
vt: save/restore unicode screen buffer for alternate screen

The alternate screen support added by commit 23743ba64709 ("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: 23743ba64709 ("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>
drivers/tty/vt/vt.c
include/linux/console_struct.h