Skip to content

Commit

Permalink
Set tab name on creation instead of on render
Browse files Browse the repository at this point in the history
  • Loading branch information
AdaShoelace committed May 31, 2021
1 parent b3e9dda commit c3dd5b8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions zellij-server/src/tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ impl Tab {
} else {
BTreeMap::new()
};

let name = if name.is_empty() {
format!("Tab #{} (unnamed)", position + 1)
} else {
name
};

Tab {
index,
position,
Expand Down

0 comments on commit c3dd5b8

Please sign in to comment.