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)
This commit is contained in:
Tim Culverhouse 2024-05-17 07:25:06 -05:00
parent 9d11d13085
commit 4f5db2b224

View file

@ -204,6 +204,8 @@ pub fn queryTerminal(self: *Vaxis) !void {
// Apply any environment variables // Apply any environment variables
if (std.posix.getenv("ASCIINEMA_REC")) |_| if (std.posix.getenv("ASCIINEMA_REC")) |_|
self.sgr = .legacy; self.sgr = .legacy;
if (std.posix.getenv("TERMUX_VERSION")) |_|
self.sgr = .legacy;
if (std.posix.getenv("VHS_RECORD")) |_| { if (std.posix.getenv("VHS_RECORD")) |_| {
self.caps.unicode = .wcwidth; self.caps.unicode = .wcwidth;
self.caps.kitty_keyboard = false; self.caps.kitty_keyboard = false;