mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 15:04:36 +03:00
fix background color cloning
4e99edf6f5
split the color into
thin/fat components, but overlooked copying the optional fat
part of the color.
That in turn broke sequences like:
* Set background color
* Erase to end of line
This commit teaches the sgr attribute cloning function to look
at the optional fat component.
refs: #962
This commit is contained in:
parent
91ae9bcbaf
commit
092effba04
@ -397,6 +397,16 @@ impl CellAttributes {
|
||||
background: self.background,
|
||||
fat: None,
|
||||
};
|
||||
if let Some(fat) = self.fat.as_ref() {
|
||||
if fat.background != ColorAttribute::Default
|
||||
|| fat.foreground != ColorAttribute::Default
|
||||
{
|
||||
res.allocate_fat_attributes();
|
||||
let mut new_fat = res.fat.as_mut().unwrap();
|
||||
new_fat.foreground = fat.foreground;
|
||||
new_fat.background = fat.background;
|
||||
}
|
||||
}
|
||||
// Reset the semantic type; clone_sgr_only is used primarily
|
||||
// to create a "blank" cell when clearing and we want that to
|
||||
// be deterministically tagged as Output so that we have an
|
||||
|
Loading…
Reference in New Issue
Block a user