summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonst Mayer <cdlscpmv@gmail.com>2023-11-18 23:05:36 +0700
committerRafael Marçalo <raroma09@gmail.com>2023-12-05 15:40:39 +0000
commita1f59a2d76a57c5276ccbc5461b7096611ef5d24 (patch)
tree672a85daf405e27b1923b68554915fb5dab7e174 /src
parentccc4484add602d36e847b4eace5f475ff24a5f12 (diff)
Change :autocmd! behavior to match documentation
According to the man page if {cmd} is used with :autocmd!, a new autocommand (with the same rules) is created for {cmd}. Also removed some unnecessary code (cmd variable is free'd a few lines below, so there is no need to clear its bits).
Diffstat (limited to 'src')
-rw-r--r--src/autocmd.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/autocmd.c b/src/autocmd.c
index 8e6af79..025567d 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -211,8 +211,6 @@ gboolean autocmd_add(Client *c, char *name, gboolean delete)
if (!util_wildmatch(pattern, cmd->pattern)) {
continue;
}
- /* remove the bits from the item */
- cmd->bits &= ~bits;
/* if the command has no matching events - remove it */
grp->cmds = g_slist_delete_link(grp->cmds, lc);
@@ -225,8 +223,6 @@ gboolean autocmd_add(Client *c, char *name, gboolean delete)
if (removed) {
rebuild_used_bits(c);
}
-
- return true;
}
/* add the new autocmd */