dont print color warning on color reset OSC 104 without parameter (294808)

This commit is contained in:
bakkeby 2020-03-24 13:49:57 +01:00
parent fa3d47596d
commit d8b8f94d64
1 changed files with 4 additions and 1 deletions

5
st.c
View File

@ -1990,7 +1990,10 @@ strhandle(void)
case 104: /* color reset, here p = NULL */ case 104: /* color reset, here p = NULL */
j = (narg > 1) ? atoi(strescseq.args[1]) : -1; j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
if (xsetcolorname(j, p)) { if (xsetcolorname(j, p)) {
fprintf(stderr, "erresc: invalid color %s\n", p); 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 { } else {
/* /*
* TODO if defaultbg color is changed, borders * TODO if defaultbg color is changed, borders