diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-02-05 13:29:35 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2023-05-08 00:48:54 +0200 |
commit | fd53c918d2e070b96a83c347ffefcf6842c3124f (patch) | |
tree | 11e3d1e8304f6e01c7da0729e0cdeddd3a3a60eb | |
parent | 694803663e99299519e1dee88106adfc973c39b3 (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
@@ -2047,8 +2047,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 { |