Merge pull request #554 from AdaShoelace/main
Don't rename 'unnamed' tabs upon deletion of other tabs
This commit is contained in:
commit
26f499bbbb
2 changed files with 8 additions and 5 deletions
|
|
@ -46,11 +46,7 @@ pub fn tab_style(
|
||||||
capabilities: PluginCapabilities,
|
capabilities: PluginCapabilities,
|
||||||
) -> LinePart {
|
) -> LinePart {
|
||||||
let separator = tab_separator(capabilities);
|
let separator = tab_separator(capabilities);
|
||||||
let mut tab_text = if text.is_empty() {
|
let mut tab_text = text;
|
||||||
format!("Tab #{}", position + 1)
|
|
||||||
} else {
|
|
||||||
text
|
|
||||||
};
|
|
||||||
if is_sync_panes_active {
|
if is_sync_panes_active {
|
||||||
tab_text.push_str(" (Sync)");
|
tab_text.push_str(" (Sync)");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -255,6 +255,13 @@ impl Tab {
|
||||||
} else {
|
} else {
|
||||||
BTreeMap::new()
|
BTreeMap::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let name = if name.is_empty() {
|
||||||
|
format!("Tab #{}", position + 1)
|
||||||
|
} else {
|
||||||
|
name
|
||||||
|
};
|
||||||
|
|
||||||
Tab {
|
Tab {
|
||||||
index,
|
index,
|
||||||
position,
|
position,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue