st

Simple Terminal by suckless.org (fork)
git clone git://git.ckyln.com/st.git
Log | Files | Refs | README | LICENSE

commit e7fbb3e5c135a042efb6c22c7659e322aa78dc4e
parent 3437768aa2782a5cfefbd56827f9eeb86c289894
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 15 Mar 2019 14:44:28 +0100

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'

Diffstat:
Mst.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/st.c b/st.c @@ -1923,7 +1923,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