fix: force legacy sgr rendering for broadest compatiblity

This fixes rendering in Windows Terminal and possibly others.

Flow now works correctly in kitty, ghostty, iterm2, gnome-terminal, konsole,
xterm, rxvt, alacritty, wezterm, foot and windows terminal.
This commit is contained in:
CJ van den Berg 2024-05-23 22:27:23 +02:00
parent d339ac77d3
commit e073e5f3db

View file

@ -84,6 +84,8 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, ret_
} }
pub fn run(self: *Self) !void { pub fn run(self: *Self) !void {
self.vx.sgr = .legacy;
if (self.vx.tty == null) { if (self.vx.tty == null) {
self.vx.tty = try vaxis.Tty.init(); self.vx.tty = try vaxis.Tty.init();
panic_cleanup_tty = &(self.vx.tty.?); panic_cleanup_tty = &(self.vx.tty.?);