diff options
author | Dante Pippi <6619666+dantepippi@users.noreply.github.com> | 2021-04-27 15:56:42 -0300 |
---|---|---|
committer | Dante Pippi <6619666+dantepippi@users.noreply.github.com> | 2021-04-28 11:16:06 -0300 |
commit | 62662464e3814bde666ec826850c9d87d4af2639 (patch) | |
tree | 5b77ff014c756e78ed9850a25cdb78714b570758 /default-plugins/tab-bar/src/tab.rs | |
parent | 6769627c3677e22a69b9059b1d85b00bd0d29bbb (diff) |
Including text on tab name to let users know sync is on.
Diffstat (limited to 'default-plugins/tab-bar/src/tab.rs')
-rw-r--r-- | default-plugins/tab-bar/src/tab.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/default-plugins/tab-bar/src/tab.rs b/default-plugins/tab-bar/src/tab.rs index a4c7c3762..0bc143b7a 100644 --- a/default-plugins/tab-bar/src/tab.rs +++ b/default-plugins/tab-bar/src/tab.rs @@ -40,9 +40,18 @@ pub fn non_active_tab(text: String) -> LinePart { } } -pub fn tab_style(text: String, is_active_tab: bool, position: usize) -> LinePart { +pub fn tab_style( + text: String, + is_active_tab: bool, + 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) + format!("Tab #{}{}", position + 1, sync_text) } else { text }; |