summaryrefslogtreecommitdiffstats
path: root/src/autocmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/autocmd.c')
-rw-r--r--src/autocmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/autocmd.c b/src/autocmd.c
index 9a758c8a45..aa11143337 100644
--- a/src/autocmd.c
+++ b/src/autocmd.c
@@ -391,10 +391,10 @@ au_cleanup(void)
prev_ap = &(first_autopat[(int)event]);
for (ap = *prev_ap; ap != NULL; ap = *prev_ap)
{
- // loop over all commands for this pattern
- prev_ac = &(ap->cmds);
int has_cmd = FALSE;
+ // loop over all commands for this pattern
+ prev_ac = &(ap->cmds);
for (ac = *prev_ac; ac != NULL; ac = *prev_ac)
{
// remove the command if the pattern is to be deleted or when
@@ -405,17 +405,17 @@ au_cleanup(void)
vim_free(ac->cmd);
vim_free(ac);
}
- else {
+ else
+ {
has_cmd = TRUE;
prev_ac = &(ac->next);
}
}
- if (ap->pat != NULL && !has_cmd) {
+ if (ap->pat != NULL && !has_cmd)
// Pattern was not marked for deletion, but all of its
// commands were. So mark the pattern for deletion.
au_remove_pat(ap);
- }
// remove the pattern if it has been marked for deletion
if (ap->pat == NULL)