linux/drivers/tty/vt
Nicolas Pitre 3ddbea7542 vt: resize saved unicode buffer on alt screen exit after resize
Instead of discarding the saved unicode buffer when the console was
resized while in the alternate screen, resize it to the current
dimensions using vc_uniscr_copy_area() to preserve its content. This
properly restores the unicode screen on alt screen exit rather than
lazily rebuilding it from a lossy reverse glyph translation.

On allocation failure the stale buffer is freed and vc_uni_lines is
set to NULL so it gets lazily rebuilt via vc_uniscr_check() when next
needed.

Fixes: 40014493ce ("vt: discard stale unicode buffer on alt screen exit after resize")
Cc: stable <stable@kernel.org>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Link: https://patch.msgid.link/3nsr334n-079q-125n-7807-n4nq818758ns@syhkavp.arg
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-30 17:39:44 +02: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
consolemap.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cp437.uni
defkeymap.c_shipped vt: defkeymap: Map keycodes above 127 to K_HOLE 2025-07-22 18:53:56 +02:00
defkeymap.map
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: resize saved unicode buffer on alt screen exit after resize 2026-03-30 17:39:44 +02:00
vt_ioctl.c tty/vt: Add missing return value for VT_RESIZE in vt_ioctl() 2025-09-06 15:49:55 +02:00