Set tab name on creation instead of on render
This commit is contained in:
parent
9cbe410740
commit
b3e9dda726
2 changed files with 6 additions and 6 deletions
|
|
@ -46,11 +46,7 @@ pub fn tab_style(
|
|||
capabilities: PluginCapabilities,
|
||||
) -> LinePart {
|
||||
let separator = tab_separator(capabilities);
|
||||
let mut tab_text = if text.is_empty() {
|
||||
format!("Tab #{}", position + 1)
|
||||
} else {
|
||||
text
|
||||
};
|
||||
let mut tab_text = text;
|
||||
if is_sync_panes_active {
|
||||
tab_text.push_str(" (Sync)");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -259,7 +259,11 @@ impl Tab {
|
|||
index,
|
||||
position,
|
||||
panes,
|
||||
name,
|
||||
name: if name.is_empty() {
|
||||
format!("Tab #{} (unnamed)", position + 1)
|
||||
} else {
|
||||
name
|
||||
},
|
||||
max_panes,
|
||||
panes_to_hide: HashSet::new(),
|
||||
active_terminal: pane_id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue