~petersanchez/st

3fac331b09780e756b4a58781410e3755094f4c7 — Hiltjo Posthuma 1 year, 2 months ago 69f14e7
Fixed OSC color reset without parameter->resets all colors

Adapted from (garbled) patch by wim <wim@thinkerwim.org>

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'
1 files changed, 2 insertions(+), 1 deletions(-)

M st.c
M st.c => st.c +2 -1
@@ 2026,8 2026,9 @@ strhandle(void)
			if (!strcmp(p, "?"))
				osc4_color_response(j);
			else if (xsetcolorname(j, p)) {
				if (par == 104 && narg <= 1)
				if (par == 104 && narg <= 1) {
					return; /* color reset without parameter */
				}
				fprintf(stderr, "erresc: invalid color j=%d, p=%s\n",
				        j, p ? p : "(null)");
			} else {