mirror of git://git.suckless.org/st
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'
This commit is contained in:
parent
e5e959835b
commit
7e8050cc62
4
st.c
4
st.c
|
@ -1932,8 +1932,10 @@ strhandle(void)
|
||||||
if (p && !strcmp(p, "?")) {
|
if (p && !strcmp(p, "?")) {
|
||||||
osc_color_response(j, 0, 1);
|
osc_color_response(j, 0, 1);
|
||||||
} else if (xsetcolorname(j, p)) {
|
} else if (xsetcolorname(j, p)) {
|
||||||
if (par == 104 && narg <= 1)
|
if (par == 104 && narg <= 1) {
|
||||||
|
xloadcols();
|
||||||
return; /* color reset without parameter */
|
return; /* color reset without parameter */
|
||||||
|
}
|
||||||
fprintf(stderr, "erresc: invalid color j=%d, p=%s\n",
|
fprintf(stderr, "erresc: invalid color j=%d, p=%s\n",
|
||||||
j, p ? p : "(null)");
|
j, p ? p : "(null)");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue