"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: tog: fix display of lines ending in \r\n
To:
gameoftrees@openbsd.org
Date:
Fri, 11 Dec 2020 00:04:25 +0100

Download raw body.

Thread
Stefan Sperling:

> @@ -1175,8 +1176,12 @@ format_line(wchar_t **wlinep, int *widthp, const char 
>  
>  	i = 0;
>  	while (i < wlen) {
> -		int width = wcwidth(wline[i]);
> +		int width;
>  
> +		if (iswcntrl(wline[i]))
> +			wline[i] = L'?';

I think that will match TABs.
... && wline[i] != L'\t'

Some source files also have old-style ^L pagination.
I do like ^ notation for control characters.

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de