diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-02-05 13:29:35 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-02-05 13:29:35 +0100 |
commit | 7e8050cc621f27002eaf1be8114dee2497beff91 (patch) | |
tree | 1d6ef5475ad0c9301ade9ec0ab780ffce783067f | |
parent | e5e959835b195c023d1f685ef4dbbcfc3b5120b2 (diff) |
Fixed OSC color reset without parameter->resets all colors
Adapted from (garbled) patch by wim <wim@thinkerwim.org>
Additional notes: it should reset all the colors using xloadcols().
To reproduce: set a different (theme) color using some escape code, then reset
it:
printf '\x1b]104\x07'
-rw-r--r-- | st.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1932,8 +1932,10 @@ strhandle(void) if (p && !strcmp(p, "?")) { osc_color_response(j, 0, 1); } else if (xsetcolorname(j, p)) { - if (par == 104 && narg <= 1) + if (par == 104 && narg <= 1) { + xloadcols(); return; /* color reset without parameter */ + } fprintf(stderr, "erresc: invalid color j=%d, p=%s\n", j, p ? p : "(null)"); } else { |