diff options
author | emersion <contact@emersion.fr> | 2019-01-08 10:05:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-08 10:05:37 +0100 |
commit | 140bc2dd5b81205df58bf06e695788e689fae397 (patch) | |
tree | 6a88913630734736763b12ec0b10da68ef413256 /sway/commands.c | |
parent | Merge pull request #3337 from RedSoxFan/fix-seat-cmd-cursor (diff) | |
parent | fixup! stringop.c: rewrite strip_whitespace (diff) | |
download | sway-140bc2dd5b81205df58bf06e695788e689fae397.tar.gz sway-140bc2dd5b81205df58bf06e695788e689fae397.tar.zst sway-140bc2dd5b81205df58bf06e695788e689fae397.zip |
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.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; |