Commit 3ddbea7
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: 4001449 ("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>1 parent 4001449 commit 3ddbea7
1 file changed
Lines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1901 | 1901 | | |
1902 | 1902 | | |
1903 | 1903 | | |
1904 | | - | |
1905 | 1904 | | |
1906 | 1905 | | |
1907 | 1906 | | |
| |||
1912 | 1911 | | |
1913 | 1912 | | |
1914 | 1913 | | |
1915 | | - | |
1916 | | - | |
1917 | | - | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
1918 | 1918 | | |
1919 | | - | |
1920 | | - | |
1921 | | - | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
1922 | 1927 | | |
1923 | | - | |
1924 | | - | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
1925 | 1931 | | |
1926 | 1932 | | |
1927 | 1933 | | |
| |||
0 commit comments