mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
terminal: make switch true/false more idiomatic zig
This commit is contained in:
@ -1028,13 +1028,10 @@ pub fn eraseDisplay(
|
||||
defer tracy.end();
|
||||
|
||||
// Erasing clears all attributes / colors _except_ the background
|
||||
switch (self.screen.cursor.pen.attrs.has_bg) {
|
||||
true => {
|
||||
const bg = self.screen.cursor.pen.bg;
|
||||
self.screen.cursor.pen = .{ .bg = bg, .attrs = .{ .has_bg = true } };
|
||||
},
|
||||
false => self.screen.cursor.pen = .{},
|
||||
}
|
||||
self.screen.cursor.pen = if (!self.screen.cursor.pen.attrs.has_bg) .{} else .{
|
||||
.bg = self.screen.cursor.pen.bg,
|
||||
.attrs = .{ .has_bg = true },
|
||||
};
|
||||
|
||||
switch (mode) {
|
||||
.complete => {
|
||||
|
Reference in New Issue
Block a user