dont print color warning on color reset OSC 104 without parameter also print explicitly "(null)" when printf "%s" p=NULL. noticed when exiting mutt: printf '\x1b]104\x07'
Hiltjo Posthuma hiltjo@codemadness.org
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
st.c
→
st.c
@@ -1865,7 +1865,10 @@ /* FALLTHROUGH */
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