Skip to content

Commit

Permalink
respect reverse video attributes for inferred cells
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wez committed Jul 25, 2021
1 parent 51cc72e commit 7192fe7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion wezterm-gui/src/termwindow/render.rs
Expand Up @@ -674,14 +674,20 @@ impl super::TermWindow {
// open a vim split horizontally. Backgrounding vim would leave
// the right pane with its prior contents instead of showing the
// 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 {
let mut quad =
match quads.cell(cell_idx + params.pos.left, params.line_idx + params.pos.top) {
Ok(quad) => quad,
Err(_) => break,
};

quad.set_bg_color(params.default_bg);
quad.set_bg_color(clear_bg);
quad.set_texture(params.white_space);
quad.set_image_texture(params.white_space);
quad.set_texture_adjust(0., 0., 0., 0.);
Expand Down

0 comments on commit 7192fe7

Please sign in to comment.