mirror of
https://github.com/swaywm/sway.git
synced 2026-04-25 06:46:24 -04:00
check for name in workspace gaps command as well
A malformed command here will lead to the same result seen in #5131, so add a check. Done inside the cmd_workspace_gaps() function itself, to take advantage of the existing 'Expected...' string.
This commit is contained in:
parent
c24ca35c28
commit
ac20d02c0a
1 changed files with 3 additions and 0 deletions
|
|
@ -60,6 +60,9 @@ static struct cmd_results *cmd_workspace_gaps(int argc, char **argv,
|
|||
int gaps_location) {
|
||||
const char expected[] = "Expected 'workspace <name> gaps "
|
||||
"inner|outer|horizontal|vertical|top|right|bottom|left <px>'";
|
||||
if (gaps_location == 0) {
|
||||
return cmd_results_new(CMD_INVALID, expected);
|
||||
}
|
||||
struct cmd_results *error = NULL;
|
||||
if ((error = checkarg(argc, "workspace", EXPECTED_EQUAL_TO,
|
||||
gaps_location + 3))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue