diff --git a/sway/commands/gaps.c b/sway/commands/gaps.c index 3791fcb4..2e0876a9 100644 --- a/sway/commands/gaps.c +++ b/sway/commands/gaps.c @@ -68,6 +68,9 @@ static struct cmd_results *gaps_set_defaults(int argc, char **argv) { return cmd_results_new(CMD_INVALID, "gaps", "Expected 'gaps inner|outer '"); } + if (amount < 0) { + amount = 0; + } if (inner) { config->gaps_inner = amount; @@ -92,6 +95,9 @@ static void configure_gaps(struct sway_workspace *ws, void *_data) { *prop -= data->amount; break; } + if (*prop < 0) { + *prop = 0; + } arrange_workspace(ws); }