On Sat, Jan 07, 2023 at 02:46:04PM +0000, Nicholas Marriott wrote: > If possible can you now give me your latest patches without 256 colours and > I will test them and see if we can get them in.
Sure, here is the latest version with _most_ of the 256 colour stuff removed. I've left in the CSI 38/48 parsing, because it's effectively a bug fix - not having it will break programs that assume it's there without checking terminfo, because they will set unwanted attributes as we discussed earlier. I first noticed this running telescope -C with TERM=xterm, and got bold, underline, dim, etc, instead of colours in the colour picker. However, even on plain 7.2-release, you get bold if you send CSI [ 38;5;1m which is a bug. It will currently only ever set colours 0-7, not even the bright versions. The only other 256 thing in there is a new define in wsdisplayvar.h for a flag which is checked by the 38/48 code, but in this version will always be unset, (because I've removed the code that sets it if bpp==32). Note that I've left the 90/100 code parsing in, to set the 'bright' colours directly, because this is expected of normal 16-colour xterm. So even with this patch we can use TERM=xterm-16color instead of TERM=xterm. If this code can go in and get plenty of testing then hopefully we can add the 256 colour stuff back in afterwards. But I'm quietly confident that this first step shouldn't cause any serious breakage. Patches are in three separate emails to follow.