Re: [hackers] [st][PATCH] sgr-patch

2024-05-01 Thread Hiltjo Posthuma
On Mon, Apr 29, 2024 at 08:18:00PM +0100, Mikhail Kot wrote:
> Hi!
> 
> Sorry, didn't see your message.
> SGR allows you to specify color delimiters in two way: colon
> or semicolon. The semicolon version is now legacy one, and many
> applications, e.g. aerc (its library vaxis-ui, to be precise)
> use colons by default. I believe it's better to support both
> versions
> 
> -- 
> Mikhail :з
> 
> 

Hi Mikhail,

Thanks for the patch, I've applied it with some changes and notes.

Below is a test script to compare to xterm:

#!/bin/sh
printf '\033[0m' # clear
printf '\033[48;2;255;0;0mtest\n'

printf '\033[0m' # clear
printf '\033[48:2:255:0:0mtest\n'
printf '\033[0m' # clear
printf '\033[48:2:255:0:0mtest\n'
printf '\033[0m' # clear
printf '\033[48;2;255:0:0mtest\n'

# not red:
printf '\033[0m' # clear
printf '\033[48:2;255:0:0mtest\n'
printf '\033[0m' # clear
printf '\033[48:2;255:0;0mtest\n'
printf '\033[0m' # clear

-- 
Kind regards,
Hiltjo



Re: [hackers] [st][PATCH] sgr-patch

2024-04-29 Thread Roberto E. Vargas Caballero
Hi,

On Mon, Apr 29, 2024 at 08:18:00PM +0100, Mikhail Kot wrote:
> Sorry, didn't see your message.
> SGR allows you to specify color delimiters in two way: colon
> or semicolon. The semicolon version is now legacy one, and many
> applications, e.g. aerc (its library vaxis-ui, to be precise)
> use colons by default. I believe it's better to support both
> versions

While I am not against adding this patch, only notice that any
application that uses directly sequences without consulting
terminfo or termcap is broken. If vaxis-ui sends SGR with colons
blindly then it should be fixed.

Said that, as the change does not have a big impact, I would
add it.

Regards,
> 
> 



Re: [hackers] [st][PATCH] sgr-patch

2024-04-29 Thread Mikhail Kot

Hi!

Sorry, didn't see your message.
SGR allows you to specify color delimiters in two way: colon
or semicolon. The semicolon version is now legacy one, and many
applications, e.g. aerc (its library vaxis-ui, to be precise)
use colons by default. I believe it's better to support both
versions

--
Mikhail :з




Re: [hackers] [st][PATCH] sgr-patch

2024-04-19 Thread Quentin Rameau
Hi Mikhail,

> Colon-separated SGR (new version; ':' is the legacy one)

Could explain a bit more what this patch is about,
with some context and telling the goal?