Skip to content
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

fix(compact-bar): properly pad mode indicator #3260

Merged
merged 1 commit into from
Apr 14, 2024

Conversation

cristiand391
Copy link
Contributor

@cristiand391 cristiand391 commented Apr 12, 2024

This PR updates the compact-bar plugin to make the mode indicator to be always centered.

before

mode indicator section hard-coded to 8-chars length, on mode names > 6 there's no padding

compact-bar-old

after

mode section gets printed as <mode-name>, use a whitespace for padding.

compact-bar-new

Closes #3248

@cristiand391 cristiand391 marked this pull request as ready for review April 13, 2024 02:58
@@ -199,7 +199,7 @@ fn tab_line_prefix(
tab_index: None,
}];
if let Some(name) = session_name {
let name_part = format!("({}) ", name);
let name_part = format!("({})", name);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the session-name part, remove the whitespace on the right, the mode part will handle padding

image

Copy link
Member

@jaeheonji jaeheonji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks👍

@jaeheonji jaeheonji merged commit e4322dc into zellij-org:main Apr 14, 2024
6 checks passed
@cristiand391 cristiand391 deleted the cd/compact-bar-padding branch April 14, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui(compact-bar): mode indicator not centered
2 participants