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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog: fix display of lines ending in \r\n
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 11 Dec 2020 01:36:51 +0100

Download raw body.

Thread
On Fri, Dec 11, 2020 at 12:35:19AM +0100, Christian Weisgerber wrote:
> Stefan Sperling:
> 
> > > Some source files also have old-style ^L pagination.
> > 
> > ^L seems to show up fine for me. It displays as "^L", i.e. ^ and L.
> 
> It's passed as whitespace and then post-processed to "^L" by whatever
> is doing that, messing up the width again.
> 
> > > I do like ^ notation for control characters.
> > 
> > Does that mean you'd rather just special-case ESC instead of the above patch?
> 
> No, I wonder whether format_line() should do the ^ escaping itself.

You've lost me a bit. Could you write a patch to demonstrate this?

Do you mean format_line() should replace e.g. formfeed with "^L", and
so on for other control characters? Won't that make the string wider
because we're now using two columns instead of one for those bytes?