summaryrefslogtreecommitdiffstats
path: root/default-plugins/tab-bar
diff options
context:
space:
mode:
authorDante Pippi <6619666+dantepippi@users.noreply.github.com>2021-04-29 10:53:13 -0300
committerDante Pippi <6619666+dantepippi@users.noreply.github.com>2021-04-29 10:53:13 -0300
commitc958fc67eb75bcc4a6d38df52b78a34e7381d38a (patch)
tree322d48534f5af7f63ee8b56fe5489e7cb91ecdd2 /default-plugins/tab-bar
parenta7363d410fc2bcfaab9f80f82109763cc18c5e8e (diff)
Fix Tab (Sync) suffix
Diffstat (limited to 'default-plugins/tab-bar')
-rw-r--r--default-plugins/tab-bar/src/tab.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/default-plugins/tab-bar/src/tab.rs b/default-plugins/tab-bar/src/tab.rs
index 0bc143b7a..398ce3f9e 100644
--- a/default-plugins/tab-bar/src/tab.rs
+++ b/default-plugins/tab-bar/src/tab.rs
@@ -47,14 +47,15 @@ pub fn tab_style(
is_sync_panes_active: bool,
) -> LinePart {
let sync_text = match is_sync_panes_active {
- true => " (Sync)".to_string(),
- false => "".to_string(),
+ true => " (Sync)",
+ false => "",
};
- 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
};
+ tab_text.push_str(sync_text);
if is_active_tab {
active_tab(tab_text)
} else {