From fd53c918d2e070b96a83c347ffefcf6842c3124f Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 5 Feb 2023 13:29:35 +0100 Subject: Fixed OSC color reset without parameter->resets all colors Adapted from (garbled) patch by wim Additional notes: it should reset all the colors using xloadcols(). To reproduce: set a different (theme) color using some escape code, then reset it: printf '\x1b]104\x07' --- st.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/st.c b/st.c index 614845f..54170ec 100644 --- a/st.c +++ b/st.c @@ -2047,8 +2047,10 @@ strhandle(void) if (p && !strcmp(p, "?")) { osc_color_response(j, 0, 1); } else if (xsetcolorname(j, p)) { - if (par == 104 && narg <= 1) + if (par == 104 && narg <= 1) { + xloadcols(); return; /* color reset without parameter */ + } fprintf(stderr, "erresc: invalid color j=%d, p=%s\n", j, p ? p : "(null)"); } else { -- cgit v1.2.3-70-g09d2