From 4f5db2b224012136138123ab43bd5c886f292612 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Fri, 17 May 2024 07:25:06 -0500 Subject: [PATCH] core: apply quirk for termux Termux spews SGR sequences to the screen if they are not legacy encoded. Add a quirk for termux (TERMUX_VERSION will be set) --- src/Vaxis.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Vaxis.zig b/src/Vaxis.zig index 5b34104..fd947c7 100644 --- a/src/Vaxis.zig +++ b/src/Vaxis.zig @@ -204,6 +204,8 @@ pub fn queryTerminal(self: *Vaxis) !void { // Apply any environment variables if (std.posix.getenv("ASCIINEMA_REC")) |_| self.sgr = .legacy; + if (std.posix.getenv("TERMUX_VERSION")) |_| + self.sgr = .legacy; if (std.posix.getenv("VHS_RECORD")) |_| { self.caps.unicode = .wcwidth; self.caps.kitty_keyboard = false;