context action now passes flags

This commit is contained in:
Valerie Wolfe 2024-06-25 14:05:28 -04:00
parent 441f1d3ef0
commit 44bad997cb
2 changed files with 11 additions and 0 deletions

View file

@ -74,6 +74,7 @@ pub fn context_action(state: &State) {
let target = util::repo_fallback();
let mut args = Arguments::from_vec( vec![(&target).into()] );
let mut substate = State::new(&mut args);
substate.flags = state.flags.clone();
if util::session_exists(&target) {
attach(&mut substate);
} else {

View file

@ -37,5 +37,15 @@ impl Flags {
}
}
pub fn clone(&self) -> Flags {
Flags {
detached: self.detached,
nested: self.nested,
quiet: self.quiet,
read_only: self.read_only,
target: None
}
}
}