commit 7e8050cc621f27002eaf1be8114dee2497beff91 from: Hiltjo Posthuma date: Sun Feb 5 12:29:35 2023 UTC 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' commit - e5e959835b195c023d1f685ef4dbbcfc3b5120b2 commit + 7e8050cc621f27002eaf1be8114dee2497beff91 blob - 62def59f17cbf1bfd841210453ba29e5578d5610 blob + 34c27adf3f755bd60cc6b45f1c34af8bb48c98bb --- st.c +++ st.c @@ -1932,8 +1932,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 {