[Toybox] Generic editor. Was: fold implementation
David Seikel
onefang at gmail.com
Mon Apr 14 22:17:45 PDT 2014
On Sat, 12 Apr 2014 21:00:37 -0500 Rob Landley <rob at landley.net> wrote:
> I'm strongly tempted to just treat both escape sequences as "we saw an
> escape sequence" and then the things after that translate the same
> whether they were after the two char or the one char version.
That's what I do.
> Except that the 8 bit one doesn't seem compatible with UTF-8, and I
> want the code to deal with UTF-8 properly.
I'm also checking for the UTF8 version of CSI.
Shortly after getting the buffer, I check for "ESC [" and the UTF8
version of CSI (C29B), then reduce them to the single byte CSI
character. Then check if it's the single byte CSI character in that big
table. This keeps the table small.
Keeping it UTF8 compatible means a bit of extra testing, but you told
me to send bite size chunks, and you said you don't care if they are
broken bite sized chunks. I tried to keep this chunk, while still
providing something that can do something.
--
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20140415/a95f8c45/attachment-0003.pgp>
More information about the Toybox
mailing list