mirror of
https://github.com/swaywm/sway.git
synced 2025-01-16 08:05:58 +01:00
Merge pull request #196 from sce/catch_empty_command
commands: Gracefully handle empty commands.
This commit is contained in:
commit
aef3191022
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue