diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c index 0883b57b..4e524a88 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -237,15 +237,15 @@ list_t *execute_command(char *_exec, struct sway_seat *seat, | |||
237 | criteria_destroy(criteria); | 237 | criteria_destroy(criteria); |
238 | config->handler_context.using_criteria = true; | 238 | config->handler_context.using_criteria = true; |
239 | // Skip leading whitespace | 239 | // Skip leading whitespace |
240 | head += strspn(head, whitespace); | 240 | for (; isspace(*head); ++head) {} |
241 | } | 241 | } |
242 | // Split command list | 242 | // Split command list |
243 | cmdlist = argsep(&head, ";"); | 243 | cmdlist = argsep(&head, ";"); |
244 | cmdlist += strspn(cmdlist, whitespace); | 244 | for (; isspace(*cmdlist); ++cmdlist) {} |
245 | do { | 245 | do { |
246 | // Split commands | 246 | // Split commands |
247 | cmd = argsep(&cmdlist, ","); | 247 | cmd = argsep(&cmdlist, ","); |
248 | cmd += strspn(cmd, whitespace); | 248 | for (; isspace(*cmd); ++cmd) {} |
249 | if (strcmp(cmd, "") == 0) { | 249 | if (strcmp(cmd, "") == 0) { |
250 | wlr_log(WLR_INFO, "Ignoring empty command."); | 250 | wlr_log(WLR_INFO, "Ignoring empty command."); |
251 | continue; | 251 | continue; |