fix(ui): fix the tab '(Sync)' suffix
This commit is contained in:
commit
20649643de
1 changed files with 5 additions and 6 deletions
|
|
@ -46,15 +46,14 @@ pub fn tab_style(
|
||||||
position: usize,
|
position: usize,
|
||||||
is_sync_panes_active: bool,
|
is_sync_panes_active: bool,
|
||||||
) -> LinePart {
|
) -> LinePart {
|
||||||
let sync_text = match is_sync_panes_active {
|
let mut tab_text = if text.is_empty() {
|
||||||
true => " (Sync)".to_string(),
|
format!("Tab #{}", position + 1)
|
||||||
false => "".to_string(),
|
|
||||||
};
|
|
||||||
let tab_text = if text.is_empty() {
|
|
||||||
format!("Tab #{}{}", position + 1, sync_text)
|
|
||||||
} else {
|
} else {
|
||||||
text
|
text
|
||||||
};
|
};
|
||||||
|
if is_sync_panes_active {
|
||||||
|
tab_text.push_str(" (Sync)");
|
||||||
|
}
|
||||||
if is_active_tab {
|
if is_active_tab {
|
||||||
active_tab(tab_text)
|
active_tab(tab_text)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue