Skip to content

Commit

Permalink
fix(status-bar): display controls line of status-bar plugin if pane s…
Browse files Browse the repository at this point in the history
…ize=1 (#1875)
  • Loading branch information
welcoMattic authored Oct 31, 2022
1 parent 1704d11 commit 86e765e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions default-plugins/status-bar/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl ZellijPlugin for State {
}
}

fn render(&mut self, _rows: usize, cols: usize) {
fn render(&mut self, rows: usize, cols: usize) {
let supports_arrow_fonts = !self.mode_info.capabilities.arrow_fonts;
let separator = if supports_arrow_fonts {
ARROW_SEPARATOR
Expand All @@ -230,7 +230,10 @@ impl ZellijPlugin for State {
println!("{}\u{1b}[48;5;{}m\u{1b}[0K", first_line, color);
},
}
println!("\u{1b}[m{}\u{1b}[0K", second_line);

if rows > 1 {
println!("\u{1b}[m{}\u{1b}[0K", second_line);
}
}
}

Expand Down

0 comments on commit 86e765e

Please sign in to comment.