···114114115115 // always show the cursor on exit
116116 tty.writeAll(ctlseqs.show_cursor) catch {};
117117+ tty.writeAll(ctlseqs.sgr_reset) catch {};
117118 if (self.screen.cursor_shape != .default) {
118119 // In many terminals, `.default` will set to the configured cursor shape. Others, it will
119120 // change to a blinking block.
···974975 try tty.writeAll(ctlseqs.sync_set);
975976 defer tty.writeAll(ctlseqs.sync_reset) catch {};
976977 try tty.writeAll(ctlseqs.sgr_reset);
978978+ defer tty.writeAll(ctlseqs.sgr_reset) catch {};
977979978980 var reposition: bool = false;
979981 var row: usize = 0;