fix(ui): fix the tab '(Sync)' suffix

This commit is contained in:
Brooks Rady 2021-04-29 15:56:15 +01:00 committed by GitHub
commit 20649643de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,15 +46,14 @@ pub fn tab_style(
position: usize,
is_sync_panes_active: bool,
) -> LinePart {
let sync_text = match is_sync_panes_active {
true => " (Sync)".to_string(),
false => "".to_string(),
};
let tab_text = if text.is_empty() {
format!("Tab #{}{}", position + 1, sync_text)
let mut tab_text = if text.is_empty() {
format!("Tab #{}", position + 1)
} else {
text
};
if is_sync_panes_active {
tab_text.push_str(" (Sync)");
}
if is_active_tab {
active_tab(tab_text)
} else {