commit 3a49409dae9b8d579a4b92370ff5ba4a48cb5156
parent 2f5b3c099965b72f4c14110fb42afc1a9d537029
Author: Piotr Piwoński <piwonskp@gmail.com>
Date: Wed, 12 Mar 2025 11:56:52 +0000
sway/commands: Return error if container is not in scratchpad
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sway/commands/scratchpad.c b/sway/commands/scratchpad.c
@@ -118,10 +118,10 @@ struct cmd_results *cmd_scratchpad(int argc, char **argv) {
// If using criteria, this command is executed for every container which
// matches the criteria. If this container isn't in the scratchpad,
- // we'll just silently return a success. The same is true if the
+ // we'll return an error. The same is true if the
// overridden node is not a container.
if (!con || !con->scratchpad) {
- return cmd_results_new(CMD_SUCCESS, NULL);
+ return cmd_results_new(CMD_INVALID, "Container is not in scratchpad.");
}
scratchpad_toggle_container(con);
} else {