[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce04dbc5-e2a7-4574-bc9c-4ecf4b7b0ece@kernel.org>
Date: Mon, 14 Apr 2025 09:18:46 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Nicolas Pitre <nico@...xnic.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Nicolas Pitre <npitre@...libre.com>, Dave Mielke <Dave@...lke.cc>,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/11] vt: pad double-width code points with a
zero-white-space
On 10. 04. 25, 3:14, Nicolas Pitre wrote:
> From: Nicolas Pitre <npitre@...libre.com>
>
> In the Unicode screen buffer, we follow double-width code points with a
> space to maintain proper column alignment. This, however, creates
> semantic problems when e.g. using cut and paste or selection.
>
> Let's use a better code point for the column padding's purpose i.e. a
> zero-white-space rather than a full space.
>
> Signed-off-by: Nicolas Pitre <npitre@...libre.com>
> ---
> drivers/tty/vt/vt.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index e3d35c4f92..dc84f9c6b7 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -2937,12 +2937,13 @@ 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 == ' ' &&
> + if (prev_c == 0x200B &&
Then introduce a NAME (macro) for this.
thanks,
--
js
suse labs
Powered by blists - more mailing lists