Repository: zellij-org/zellij (language: rust)

Issue:
status-bar broken with size=1
I found [this PR](https://github.com/zellij-org/zellij/pull/1875), which is supposed to only display the shortcut bar and no tips with `size=1`.

This seems to be broken in `zellij 0.34.4`. I am using the following layout:

```
layout {
    pane size=1 borderless=true {
        plugin location="zellij:tab-bar"
    }
    pane {
        pane 
    }
    pane size=1 borderless=true {
        plugin location="zellij:status-bar"
    }
}
```

But the status-bar does not appear at all. If I configure it with `size=2`, it works.

Also: If this `size=1` would work, what happens if I hit e.g. CTRL+ T? Usually, further hints (`<n> New`) are displayed on line 2.
Is it possible to still get these, but with `size=1`, basically overwriting the first line of the status bar?

Thanks in advance ❤


Discussion / hints:
Hey - we made some changes to the plugin system that might have broken this. This was a bit of "undefined behavior" to begin with... I am definitely open to implement some conditional rendering here though. I like your suggestion about displaying the tips if we're inside a non-normal mode. Adding a "help wanted" here if anyone's interested in working on this.

Fix patch:
diff --git a/default-plugins/status-bar/src/main.rs b/default-plugins/status-bar/src/main.rs
index 027425a3ae..9a110310af 100644
--- a/default-plugins/status-bar/src/main.rs
+++ b/default-plugins/status-bar/src/main.rs
@@ -248,10 +248,26 @@ impl ZellijPlugin for State {
         // [m is background reset, [0K is so that it clears the rest of the line
         match background {
             PaletteColor::Rgb((r, g, b)) => {
-                println!("{}\u{1b}[48;2;{};{};{}m\u{1b}[0K", first_line, r, g, b);
+                if rows > 1 {
+                    println!("{}\u{1b}[48;2;{};{};{}m\u{1b}[0K", first_line, r, g, b);
+                } else {
+                    if self.mode_info.mode == InputMode::Normal {
+                        print!("{}\u{1b}[48;2;{};{};{}m\u{1b}[0K", first_line, r, g, b);
+                    } else {
+                        print!("\u{1b}[m{}\u{1b}[0K", second_line);
+                    }
+                }
             },
             PaletteColor::EightBit(color) => {
-                println!("{}\u{1b}[48;5;{}m\u{1b}[0K", first_line, color);
+                if rows > 1 {
+                    println!("{}\u{1b}[48;5;{}m\u{1b}[0K", first_line, color);
+                } else {
+                    if self.mode_info.mode == InputMode::Normal {
+                        print!("{}\u{1b}[48;5;{}m\u{1b}[0K", first_line, color);
+                    } else {
+                        print!("\u{1b}[m{}\u{1b}[0K", second_line);
+                    }
+                }
             },
         }
 


Test patch: