diff --git a/README.md b/README.md index a3d670a..8550a70 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.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. +Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.9.3 (688f70a, 2026-01-15) 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.def.h b/config.def.h index 6b3b9c9..79e279f 100644 --- a/config.def.h +++ b/config.def.h @@ -8,7 +8,7 @@ static char *font = "Cascadia Code NF:regular:pixelsize=13.5:fontfeatures=calt,ss01:antialias=true:autohint=true"; #if FONT2_PATCH /* Spare fonts */ -static char *font2[] = { "CaskaydiaCove Nerd Font:pixelsize=13.5:antialias=true:autohint=true" }; +static char *font2[] = { "emoji:pixelsize=13.5:antialias=true:autohint=true" }; #endif // FONT2_PATCH #if BACKGROUND_IMAGE_PATCH diff --git a/flake.nix b/flake.nix index 6d219c4..03a79a6 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,7 @@ devShell = pkgs.mkShell { inputsFrom = [ packages.st ]; + hardeningDisable = [ "fortify" ]; packages = with pkgs; [ bear clang-tools diff --git a/st.c b/st.c index 3f1fcd6..ae436f3 100644 --- a/st.c +++ b/st.c @@ -1102,6 +1102,9 @@ tsetdirt(int top, int bot) { int i; + if (term.row <= 0) + return; + LIMIT(top, 0, term.row-1); LIMIT(bot, 0, term.row-1); @@ -3332,6 +3335,7 @@ eschandle(uchar ascii) resettitle(); xloadcols(); xsetmode(0, MODE_HIDE); + xsetmode(0, MODE_BRCKTPASTE); #if SCROLLBACK_PATCH && !REFLOW_PATCH if (!IS_SET(MODE_ALTSCREEN)) { term.scr = 0; @@ -3466,6 +3470,11 @@ check_control_code: return; #if SIXEL_PATCH } else if (term.esc & ESC_DCS) { + /* Skip if DCS escape sequence buffer is full */ + if (csiescseq.len >= sizeof(csiescseq.buf) - 1) { + return; + } + csiescseq.buf[csiescseq.len++] = u; if (BETWEEN(u, 0x40, 0x7E) || csiescseq.len >= \