Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
dont print color warning on color reset OSC 104 without parameter
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
f342e5c
..
48d65ca
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-1865,7
+1865,10
@@
strhandle(void)
case 104: /* color reset, here p = NULL */
j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
if (xsetcolorname(j, p)) {
case 104: /* color reset, here p = NULL */
j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
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 {
/*
* TODO if defaultbg color is changed, borders
} else {
/*
* TODO if defaultbg color is changed, borders