aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/commands/workspace.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c
index b911b2f6..2858a284 100644
--- a/sway/commands/workspace.c
+++ b/sway/commands/workspace.c
@@ -60,6 +60,9 @@ static struct cmd_results *cmd_workspace_gaps(int argc, char **argv,
60 int gaps_location) { 60 int gaps_location) {
61 const char expected[] = "Expected 'workspace <name> gaps " 61 const char expected[] = "Expected 'workspace <name> gaps "
62 "inner|outer|horizontal|vertical|top|right|bottom|left <px>'"; 62 "inner|outer|horizontal|vertical|top|right|bottom|left <px>'";
63 if (gaps_location == 0) {
64 return cmd_results_new(CMD_INVALID, expected);
65 }
63 struct cmd_results *error = NULL; 66 struct cmd_results *error = NULL;
64 if ((error = checkarg(argc, "workspace", EXPECTED_EQUAL_TO, 67 if ((error = checkarg(argc, "workspace", EXPECTED_EQUAL_TO,
65 gaps_location + 3))) { 68 gaps_location + 3))) {
@@ -140,7 +143,10 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
140 break; 143 break;
141 } 144 }
142 } 145 }
143 if (output_location >= 0) { 146 if (output_location == 0) {
147 return cmd_results_new(CMD_INVALID,
148 "Expected 'workspace <name> output <output>'");
149 } else if (output_location > 0) {
144 if ((error = checkarg(argc, "workspace", EXPECTED_AT_LEAST, 150 if ((error = checkarg(argc, "workspace", EXPECTED_AT_LEAST,
145 output_location + 2))) { 151 output_location + 2))) {
146 return error; 152 return error;