diff --git a/README.md b/README.md index 0b46f59..92f9889 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.9.2 (f114bce, 2025-07-27) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more. +Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.9.3 (6e97047, 2025-08-09) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more. For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/st-flexipatch/blob/master/patches.def.h): ```c diff --git a/config.mk b/config.mk index 7becffc..a3b94cd 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,5 @@ # st version -VERSION = 0.9.2 +VERSION = 0.9.3 # Customize below to fit your system diff --git a/st.c b/st.c index 74dac7d..0d56e00 100644 --- a/st.c +++ b/st.c @@ -1837,7 +1837,7 @@ tsetattr(const int *attr, int l) term.c.attr.fg = idx; #endif // MONOCHROME_PATCH break; - case 39: + case 39: /* set foreground color to default */ term.c.attr.fg = defaultfg; break; case 48: @@ -1848,7 +1848,7 @@ tsetattr(const int *attr, int l) term.c.attr.bg = idx; #endif // MONOCHROME_PATCH break; - case 49: + case 49: /* set background color to default */ term.c.attr.bg = defaultbg; break; #if UNDERCURL_PATCH @@ -1985,7 +1985,7 @@ tsetmode(int priv, int set, const int *args, int narg) case 1006: /* 1006: extended reporting mode */ xsetmode(set, MODE_MOUSESGR); break; - case 1034: + case 1034: /* 1034: enable 8-bit mode for keyboard input */ xsetmode(set, MODE_8BIT); break; case 1049: /* swap screen & set/restore cursor as xterm */ @@ -1993,8 +1993,8 @@ tsetmode(int priv, int set, const int *args, int narg) break; tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); /* FALLTHROUGH */ - case 47: /* swap screen */ - case 1047: + case 47: /* swap screen buffer */ + case 1047: /* swap screen buffer */ if (!allowaltscreen) break; #if REFLOW_PATCH @@ -2018,7 +2018,7 @@ tsetmode(int priv, int set, const int *args, int narg) break; /* FALLTHROUGH */ #endif // REFLOW_PATCH - case 1048: + case 1048: /* save/restore cursor (like DECSC/DECRC) */ #if REFLOW_PATCH if (!allowaltscreen) break; @@ -2656,7 +2656,7 @@ strhandle(void) xsettitle(strescseq.args[1]); #endif // CSI_22_23_PATCH return; - case 52: + case 52: /* manipulate selection data */ if (narg > 2 && allowwindowops) { dec = base64dec(strescseq.args[2]); if (dec) { @@ -2674,9 +2674,9 @@ strhandle(void) #endif // OSC7_PATCH case 8: /* Clear Hyperlinks */ return; - case 10: - case 11: - case 12: + case 10: /* set dynamic VT100 text foreground color */ + case 11: /* set dynamic VT100 text background color */ + case 12: /* set dynamic text cursor color */ if (narg < 2) break; p = strescseq.args[1]; @@ -2717,6 +2717,19 @@ strhandle(void) tfulldirt(); } return; + case 110: /* reset dynamic VT100 text foreground color */ + case 111: /* reset dynamic VT100 text background color */ + case 112: /* reset dynamic text cursor color */ + if (narg != 1) + break; + if ((j = par - 110) < 0 || j >= LEN(osc_table)) + break; /* shouldn't be possible */ + if (xsetcolorname(osc_table[j].idx, NULL)) { + fprintf(stderr, "erresc: %s color not found\n", osc_table[j].str); + } else { + tfulldirt(); + } + return; #if OSC133_PATCH case 133: if (narg < 2)