mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 22:33:52 +03:00
respect reverse video attributes for inferred cells
In the case where the cells vec is shorter than the line width, we need to ensure that we render the inverse video background color if that mode is in effect. refs: #133
This commit is contained in:
parent
51cc72e299
commit
7192fe7696
@ -674,6 +674,12 @@ impl super::TermWindow {
|
|||||||
// open a vim split horizontally. Backgrounding vim would leave
|
// open a vim split horizontally. Backgrounding vim would leave
|
||||||
// the right pane with its prior contents instead of showing the
|
// the right pane with its prior contents instead of showing the
|
||||||
// cleared lines from the shell in the main screen.
|
// cleared lines from the shell in the main screen.
|
||||||
|
let clear_bg = if params.line.is_reverse() {
|
||||||
|
params.foreground
|
||||||
|
} else {
|
||||||
|
params.default_bg
|
||||||
|
};
|
||||||
|
|
||||||
for cell_idx in 0..num_cols {
|
for cell_idx in 0..num_cols {
|
||||||
let mut quad =
|
let mut quad =
|
||||||
match quads.cell(cell_idx + params.pos.left, params.line_idx + params.pos.top) {
|
match quads.cell(cell_idx + params.pos.left, params.line_idx + params.pos.top) {
|
||||||
@ -681,7 +687,7 @@ impl super::TermWindow {
|
|||||||
Err(_) => break,
|
Err(_) => break,
|
||||||
};
|
};
|
||||||
|
|
||||||
quad.set_bg_color(params.default_bg);
|
quad.set_bg_color(clear_bg);
|
||||||
quad.set_texture(params.white_space);
|
quad.set_texture(params.white_space);
|
||||||
quad.set_image_texture(params.white_space);
|
quad.set_image_texture(params.white_space);
|
||||||
quad.set_texture_adjust(0., 0., 0., 0.);
|
quad.set_texture_adjust(0., 0., 0., 0.);
|
||||||
|
Loading…
Reference in New Issue
Block a user