tdont print color warning on color reset OSC 104 without parameter - st - [fork… | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit b650256044f867851725f712fdac58d4ff294808 | |
parent 9acec468fbeaa9f90578352b610431ca9b2d4ee4 | |
Author: Hiltjo Posthuma <[email protected]> | |
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: | |
M st.c | 5 ++++- | |
1 file changed, 4 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/st.c b/st.c | |
t@@ -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", … | |
+ if (par == 104 && narg <= 1) | |
+ return; /* color reset without paramet… | |
+ fprintf(stderr, "erresc: invalid color j=%d, p… | |
+ j, p ? p : "(null)"); | |
} else { | |
/* | |
* TODO if defaultbg color is changed, borders |