diff options
author | 2025-04-26 11:21:14 +0200 | |
---|---|---|
committer | 2025-04-26 11:21:14 +0200 | |
commit | 7eaf91626e1c02e46382ed154e389bb08074865b (patch) | |
tree | 7d15085b805b607de31693ceff1e31a198a25de0 /drivers/tty/vt | |
parent | Revert "vt: remove zero-white-space handling from conv_uni_to_pc()" (diff) | |
download | wireguard-linux-7eaf91626e1c02e46382ed154e389bb08074865b.tar.xz wireguard-linux-7eaf91626e1c02e46382ed154e389bb08074865b.zip |
Revert "vt: pad double-width code points with a zero-white-space"
This reverts commit 547f57b88d5f2ad4e9ab5e0d63a668467c10c736.
A new version of the series was submitted, so it's easier to revert the
old one and add the new one due to the changes invovled.
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r-- | drivers/tty/vt/vt.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index dc84f9c6b7c6..e3d35c4f9204 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -2937,13 +2937,12 @@ static int vc_con_write_normal(struct vc_data *vc, int tc, int c, width = 2; } else if (ucs_is_zero_width(c)) { prev_c = vc_uniscr_getc(vc, -1); - if (prev_c == 0x200B && + if (prev_c == ' ' && ucs_is_double_width(vc_uniscr_getc(vc, -2))) { /* * Let's merge this zero-width code point with * the preceding double-width code point by - * replacing the existing zero-white-space - * padding. + * replacing the existing whitespace padding. */ vc_con_rewind(vc); } else if (c == 0xfe0f && prev_c != 0) { @@ -3041,11 +3040,7 @@ static int vc_con_write_normal(struct vc_data *vc, int tc, int c, tc = conv_uni_to_pc(vc, ' '); if (tc < 0) tc = ' '; - /* - * Store a zero-white-space in the Unicode screen given that - * the previous code point is semantically double-width. - */ - next_c = 0x200B; + next_c = ' '; } out: |