mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
terminal: only use bg attr when erasing line
Similar to eraseDisplay semantics, erase line should only apply the bg attr to erased cells.
This commit is contained in:
@ -1283,10 +1283,15 @@ pub fn eraseLine(
|
||||
},
|
||||
};
|
||||
|
||||
const pen: Screen.Cell = if (!self.screen.cursor.pen.attrs.has_bg) .{} else .{
|
||||
.bg = self.screen.cursor.pen.bg,
|
||||
.attrs = .{ .has_bg = true },
|
||||
};
|
||||
|
||||
for (start..end) |x| {
|
||||
const cell = row.getCellPtr(x);
|
||||
if (cell.attrs.protected) continue;
|
||||
cell.* = self.screen.cursor.pen;
|
||||
cell.* = pen;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user