Re: [hackers] [st][PATCH]] Fixed osc color reset without parameter->resets all colors

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sun, 5 Feb 2023 13:35:00 +0100

On Sat, Feb 04, 2023 at 12:15:29PM +0100, wim wrote:
> ---
> st.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/st.c b/st.c
> index 62def59..6b9abc0 100644
> --- a/st.c
> +++ b/st.c
> _AT_@ -1932,9 +1932,11 @@ strhandle(void)
> if (p && !strcmp(p, "?")) {
> osc_color_response(j, 0, 1);
> } else if (xsetcolorname(j, p)) {
> - if (par == 104 && narg <= 1)
> - return; /* color reset without parameter */
> - fprintf(stderr, "erresc: invalid color j=%d, p=%s\n",
> + if (par == 104 && narg <= 1){/* color reset without parameter */
> + xloadcols();
> + return;
> + }
> + fprintf(stderr, "erresc: invalid color j=%d, p=%s\n",
> j, p ? p : "(null)");
> } else {
> /*
>
> --
> 2.39.1
>
>

Hi,

Like I said on IRC (you didn't respond): please be more detailed next time.
Even though this patch is trivial, some explanation describing the issue and
some steps to reproduce it makes it much easier to review etc.

Also the patch white-space was garbled,

Otherwise, thanks for the patch.

-- 
Kind regards,
Hiltjo
Received on Sun Feb 05 2023 - 13:35:00 CET

This archive was generated by hypermail 2.3.0 : Sun Feb 05 2023 - 13:36:33 CET