Merge pull request #196 from sce/catch_empty_command

commands: Gracefully handle empty commands.
This commit is contained in:
Drew DeVault 2015-10-19 13:52:49 -04:00
commit aef3191022

View file

@ -1178,6 +1178,11 @@ enum cmd_status handle_command(char *_exec) {
// Split commands
cmd = argsep(&cmdlist, ",");
cmd += strspn(cmd, whitespace);
if (strcmp(cmd, "") == 0) {
sway_log(L_INFO, "Ignoring empty command.");
continue;
}
sway_log(L_INFO, "Handling command '%s'", cmd);
//TODO better handling of argv
int argc;