mirror of
https://github.com/wez/wezterm.git
synced 2024-11-25 21:07:39 +03:00
parent
51294e03c1
commit
46e14461eb
@ -1099,9 +1099,20 @@ impl Mux {
|
||||
SpawnTabDomain::DomainId(domain_id) => self
|
||||
.get_domain(*domain_id)
|
||||
.ok_or_else(|| anyhow!("domain id {} is invalid", domain_id))?,
|
||||
SpawnTabDomain::DomainName(name) => self
|
||||
.get_domain_by_name(&name)
|
||||
.ok_or_else(|| anyhow!("domain name {} is invalid", name))?,
|
||||
SpawnTabDomain::DomainName(name) => {
|
||||
self.get_domain_by_name(&name).ok_or_else(|| {
|
||||
let names: Vec<String> = self
|
||||
.domains_by_name
|
||||
.read()
|
||||
.keys()
|
||||
.map(|name| format!("\"{name}\""))
|
||||
.collect();
|
||||
anyhow!(
|
||||
"domain name \"{name}\" is invalid. Possible names are {}.",
|
||||
names.join(", ")
|
||||
)
|
||||
})?
|
||||
}
|
||||
};
|
||||
Ok(domain)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user