mirror of
https://github.com/NickHu/sway
synced 2024-12-26 21:58:30 +01:00
Invoke command handlers once parsed
This commit is contained in:
parent
7753a0ec75
commit
b379b40071
1 changed files with 10 additions and 0 deletions
|
@ -177,6 +177,16 @@ struct cmd_results *handle_command(char *_exec) {
|
|||
free_argv(argc, argv);
|
||||
goto cleanup;
|
||||
}
|
||||
struct cmd_results *res = handler->handle(argc-1, argv+1);
|
||||
if (res->status != CMD_SUCCESS) {
|
||||
free_argv(argc, argv);
|
||||
if (results) {
|
||||
free_cmd_results(results);
|
||||
}
|
||||
results = res;
|
||||
goto cleanup;
|
||||
}
|
||||
free_cmd_results(res);
|
||||
free_argv(argc, argv);
|
||||
} while(cmdlist);
|
||||
} while(head);
|
||||
|
|
Loading…
Reference in a new issue