config: fix toml move-to-workspace action
This commit is contained in:
parent
c921e2400e
commit
2a517f437a
3 changed files with 6 additions and 1 deletions
|
|
@ -60,6 +60,7 @@ pub enum Action {
|
|||
ConfigureInput { input: Input },
|
||||
ConfigureOutput { out: Output },
|
||||
Exec { exec: Exec },
|
||||
MoveToWorkspace { name: String },
|
||||
Multi { actions: Vec<Action> },
|
||||
SetEnv { env: Vec<(String, String)> },
|
||||
SetGfxApi { api: GfxApi },
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ impl ActionParser<'_> {
|
|||
|
||||
fn parse_move_to_workspace(&mut self, ext: &mut Extractor<'_>) -> ParseResult<Self> {
|
||||
let name = ext.extract(str("name"))?.value.to_string();
|
||||
Ok(Action::ShowWorkspace { name })
|
||||
Ok(Action::MoveToWorkspace { name })
|
||||
}
|
||||
|
||||
fn parse_configure_connector(&mut self, ext: &mut Extractor<'_>) -> ParseResult<Self> {
|
||||
|
|
|
|||
|
|
@ -75,6 +75,10 @@ impl Action {
|
|||
let workspace = get_workspace(&name);
|
||||
Box::new(move || s.show_workspace(workspace))
|
||||
}
|
||||
Action::MoveToWorkspace { name } => {
|
||||
let workspace = get_workspace(&name);
|
||||
Box::new(move || s.set_workspace(workspace))
|
||||
}
|
||||
Action::ConfigureConnector { con } => Box::new(move || {
|
||||
for c in connectors() {
|
||||
if con.match_.matches(c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue