diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands.c b/sway/commands.c index 6e74a442..cf3d5b3f 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -519,8 +519,7 @@ static bool cmd_gaps(struct sway_config *config, int argc, char **argv) { | |||
519 | } | 519 | } |
520 | 520 | ||
521 | if (argc == 1) { | 521 | if (argc == 1) { |
522 | char *end; | 522 | int amount = (int)strtol(argv[0], NULL, 10); |
523 | int amount = (int)strtol(argv[0], &end, 10); | ||
524 | if (errno == ERANGE || amount == 0) { | 523 | if (errno == ERANGE || amount == 0) { |
525 | errno = 0; | 524 | errno = 0; |
526 | return false; | 525 | return false; |
@@ -532,8 +531,7 @@ static bool cmd_gaps(struct sway_config *config, int argc, char **argv) { | |||
532 | config->gaps_outer = amount; | 531 | config->gaps_outer = amount; |
533 | } | 532 | } |
534 | } else if (argc == 2) { | 533 | } else if (argc == 2) { |
535 | char *end; | 534 | int amount = (int)strtol(argv[1], NULL, 10); |
536 | int amount = (int)strtol(argv[1], &end, 10); | ||
537 | if (errno == ERANGE || amount == 0) { | 535 | if (errno == ERANGE || amount == 0) { |
538 | errno = 0; | 536 | errno = 0; |
539 | return false; | 537 | return false; |
@@ -548,6 +546,7 @@ static bool cmd_gaps(struct sway_config *config, int argc, char **argv) { | |||
548 | } else { | 546 | } else { |
549 | return false; | 547 | return false; |
550 | } | 548 | } |
549 | arrange_windows(&root_container, -1, -1); | ||
551 | return true; | 550 | return true; |
552 | } | 551 | } |
553 | 552 | ||