···108108pub fn deinit(self: *Vaxis, alloc: ?std.mem.Allocator, tty: AnyWriter) void {
109109 self.resetState(tty) catch {};
110110111111- // always show the cursor on exit
112112- tty.writeAll(ctlseqs.show_cursor) catch {};
113113- tty.writeAll(ctlseqs.sgr_reset) catch {};
114114- if (self.screen.cursor_shape != .default) {
115115- // In many terminals, `.default` will set to the configured cursor shape. Others, it will
116116- // change to a blinking block.
117117- tty.print(ctlseqs.cursor_shape, .{@intFromEnum(Cell.CursorShape.default)}) catch {};
118118- }
119111 if (alloc) |a| {
120112 self.screen.deinit(a);
121113 self.screen_last.deinit(a);
···125117126118/// resets enabled features, sends cursor to home and clears below cursor
127119pub fn resetState(self: *Vaxis, tty: AnyWriter) !void {
120120+ // always show the cursor on state reset
121121+ tty.writeAll(ctlseqs.show_cursor) catch {};
122122+ tty.writeAll(ctlseqs.sgr_reset) catch {};
123123+ if (self.screen.cursor_shape != .default) {
124124+ // In many terminals, `.default` will set to the configured cursor shape. Others, it will
125125+ // change to a blinking block.
126126+ tty.print(ctlseqs.cursor_shape, .{@intFromEnum(Cell.CursorShape.default)}) catch {};
127127+ }
128128 if (self.state.kitty_keyboard) {
129129 try tty.writeAll(ctlseqs.csi_u_pop);
130130 self.state.kitty_keyboard = false;