-
-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display controls line of status-bar plugin if pane size=1 #1875
Display controls line of status-bar plugin if pane size=1 #1875
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @welcoMattic - looking great! Thanks for choosing us for your first Rust PR :)
I left a minor comment in the code. Otherwise, I think I'd rather not add another default layout for this so they won't get too crowded. We've now changed the plugin so it "does the right thing" if someone chooses to create such a layout.
After these changes, I'd be happy to merge.
@@ -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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change this to rows
- it was previously prefixed with an underscore to denote that it's an unused variable in this function. Now we use it.
2e910df
to
e78e888
Compare
@imsnif Thanks for your review. I addressed your comments, I hope it's now ok for you ;) |
Thanks @welcoMattic ! |
@welcoMattic does this still work for you? I've tried this today with Here is my layout:
|
@panki27 you are right, since last version it's broken. Can you open a new issue please? |
@welcoMattic thank you for confirming! |
Ref #1864
This PR will display only the controls line of status bar plugin if its pane has
size=1
instead of tip line.The tip line is still displayed if
size=2
.(FYI: it's my 1st PR on a Rust project, if it miss something let me know)