summaryrefslogtreecommitdiffstats
path: root/sway/commands/bar/id.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-10-14 14:30:52 +0200
committerLibravatar GitHub <noreply@github.com>2018-10-14 14:30:52 +0200
commitabde9d6627483256ccfd20bdeeaa52d7790b0426 (patch)
treea851a6f4f6356470123d5d870c5d12fb9de78f73 /sway/commands/bar/id.c
parentMerge pull request #2829 from espkk/master (diff)
parentcmd_bar: simplify logic (diff)
downloadsway-abde9d6627483256ccfd20bdeeaa52d7790b0426.tar.gz
sway-abde9d6627483256ccfd20bdeeaa52d7790b0426.tar.zst
sway-abde9d6627483256ccfd20bdeeaa52d7790b0426.zip
Merge pull request #2808 from RedSoxFan/bar-subcommands
Fix bar subcommand handler structs and selection
Diffstat (limited to 'sway/commands/bar/id.c')
-rw-r--r--sway/commands/bar/id.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/commands/bar/id.c b/sway/commands/bar/id.c
index 65fa69fd..7690a852 100644
--- a/sway/commands/bar/id.c
+++ b/sway/commands/bar/id.c
@@ -13,6 +13,8 @@ struct cmd_results *bar_cmd_id(int argc, char **argv) {
13 const char *oldname = config->current_bar->id; 13 const char *oldname = config->current_bar->id;
14 if (strcmp(name, oldname) == 0) { 14 if (strcmp(name, oldname) == 0) {
15 return cmd_results_new(CMD_SUCCESS, NULL, NULL); // NOP 15 return cmd_results_new(CMD_SUCCESS, NULL, NULL); // NOP
16 } else if (strcmp(name, "id") == 0) {
17 return cmd_results_new(CMD_INVALID, "id", "id cannot be 'id'");
16 } 18 }
17 // check if id is used by a previously defined bar 19 // check if id is used by a previously defined bar
18 for (int i = 0; i < config->bars->length; ++i) { 20 for (int i = 0; i < config->bars->length; ++i) {