diff options
| author | Mathieu Santostefano <msantostefano@protonmail.com> | 2022-10-31 19:40:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-31 19:40:27 +0100 |
| commit | 86e765ea4de517ebf43b9effbefddd4a34416f30 (patch) | |
| tree | 827578a051baaa9530c0c8a8128ea2b5746cf701 /default-plugins/status-bar/src | |
| parent | docs(changelog): mouse mode runtime toggle (diff) | |
| download | sl0ppij-86e765ea4de517ebf43b9effbefddd4a34416f30.tar.gz sl0ppij-86e765ea4de517ebf43b9effbefddd4a34416f30.tar.xz sl0ppij-86e765ea4de517ebf43b9effbefddd4a34416f30.zip | |
fix(status-bar): display controls line of status-bar plugin if pane size=1 (#1875)
Diffstat (limited to 'default-plugins/status-bar/src')
| -rw-r--r-- | default-plugins/status-bar/src/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs index 38728d25..800fb82c 100644 --- a/default-plugins/status-bar/src/main.rs +++ b/default-plugins/status-bar/src/main.rs @@ -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 @@ -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); + } } } |
