terminal: properly clear style in error scenario

This commit is contained in:
Mitchell Hashimoto
2024-03-21 09:37:44 -07:00
parent 1949b2b177
commit 3513b1cdc2

View File

@ -634,6 +634,8 @@ fn cursorChangePin(self: *Screen, new: Pin) void {
// gracefully back to the default style.
log.err("failed to update style on cursor change err={}", .{err});
self.cursor.style = .{};
self.cursor.style_id = 0;
self.cursor.style_ref = null;
};
}