diff options
author | Hiltjo Posthuma | 2019-03-15 14:44:28 +0100 |
---|---|---|
committer | Hiltjo Posthuma | 2019-03-15 14:47:08 +0100 |
commit | 8787d3f2012bdad3467abd06769604ba1bee4abf (patch) | |
tree | 909c4f3f3460b300f09dc51339e3ffe94be7c195 | |
parent | 03c651a88d3598691a3c8ea2459b7e5d4b78482f (diff) | |
download | aur-8787d3f2012bdad3467abd06769604ba1bee4abf.tar.gz |
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'
-rw-r--r-- | st.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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)) { - 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 |