aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2019-01-08 10:05:37 +0100
committerGitHub <noreply@github.com>2019-01-08 10:05:37 +0100
commit140bc2dd5b81205df58bf06e695788e689fae397 (patch)
tree6a88913630734736763b12ec0b10da68ef413256 /sway/commands.c
parent353d9ed74f3560e12500c08920cf8a1ca3344cc2 (diff)
parent5bef06adfdac4ce9940dcaf2d90a4bdffae7bba9 (diff)
Merge pull request #3275 from ianyfan/remove-readline
Rewrite strip_whitespace and remove readline.c
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c6
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,
criteria_destroy(criteria);
config->handler_context.using_criteria = true;
// Skip leading whitespace
- head += strspn(head, whitespace);
+ for (; isspace(*head); ++head) {}
}
// Split command list
cmdlist = argsep(&head, ";");
- cmdlist += strspn(cmdlist, whitespace);
+ for (; isspace(*cmdlist); ++cmdlist) {}
do {
// Split commands
cmd = argsep(&cmdlist, ",");
- cmd += strspn(cmd, whitespace);
+ for (; isspace(*cmd); ++cmd) {}
if (strcmp(cmd, "") == 0) {
wlr_log(WLR_INFO, "Ignoring empty command.");
continue;