mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a16014c0db
commit
68e7a421ab
@@ -2930,8 +2930,15 @@ static int vc_process_ucs(struct vc_data *vc, int *c, int *tc)
|
||||
{
|
||||
u32 prev_c, curr_c = *c;
|
||||
|
||||
if (ucs_is_double_width(curr_c))
|
||||
if (ucs_is_double_width(curr_c)) {
|
||||
/*
|
||||
* The Unicode screen memory is allocated only when
|
||||
* required. This is one such case as we need to remember
|
||||
* which displayed characters are double-width.
|
||||
*/
|
||||
vc_uniscr_check(vc);
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (!ucs_is_zero_width(curr_c))
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user