Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vt: make sure displayed double-width characters are remembered as such

And to do so we ensure the Unicode screen buffer is initialized when
double-width characters are encountered.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Link: https://lore.kernel.org/r/20250507141535.40655-3-nico@fluxnic.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Nicolas Pitre and committed by
Greg Kroah-Hartman
68e7a421 a16014c0

+8 -1
+8 -1
drivers/tty/vt/vt.c
··· 2930 2930 { 2931 2931 u32 prev_c, curr_c = *c; 2932 2932 2933 - if (ucs_is_double_width(curr_c)) 2933 + if (ucs_is_double_width(curr_c)) { 2934 + /* 2935 + * The Unicode screen memory is allocated only when 2936 + * required. This is one such case as we need to remember 2937 + * which displayed characters are double-width. 2938 + */ 2939 + vc_uniscr_check(vc); 2934 2940 return 2; 2941 + } 2935 2942 2936 2943 if (!ucs_is_zero_width(curr_c)) 2937 2944 return 1;