mux: restore same-domain check for cwd when spawning tabs
I think this got lost when this mux function was refactored into this location from elsewhere. refs: #2092
This commit is contained in:
1 parent
d85b7bf3b9
commit
d2faa96271
1 file changed
+12
-1
+12
-1
@@ -1084,7 +1084,18 @@ impl Mux {
|
||||
let cwd = self.resolve_cwd(
|
||||
command_dir,
|
||||
match current_pane_id {
|
||||
Some(id) => self.get_pane(id),
|
||||
Some(id) => {
|
||||
// Only use the cwd from the current pane if the domain
|
||||
// is the same as the one we are spawning into
|
||||
let (current_domain_id, _, _) = self
|
||||
.resolve_pane_id(id)
|
||||
.ok_or_else(|| anyhow!("pane_id {} invalid", id))?;
|
||||
if current_domain_id == domain.domain_id() {
|
||||
self.get_pane(id)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
None => None,
|
||||
},
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user