diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-09-11 15:24:31 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-09-11 15:24:31 +0000 |
commit | 5b7880dea208fd78b627d2aac7ac8dbfff33e556 (patch) | |
tree | 41720597788db3a9b18ce2f55691c3e2205a6f2f /src/fileio.c | |
parent | 86c800a1b39603ba612a4a4f6e76c64c3d022789 (diff) |
updated for version 7.2-259v7.2.259
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/fileio.c b/src/fileio.c index 46d364a67e..5deb1a3984 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -9498,15 +9498,10 @@ au_exists(arg) ap = first_autopat[(int)event]; if (ap == NULL) goto theend; - if (pattern == NULL) - { - retval = TRUE; - goto theend; - } /* if pattern is "<buffer>", special handling is needed which uses curbuf */ /* for pattern "<buffer=N>, fnamecmp() will work fine */ - if (STRICMP(pattern, "<buffer>") == 0) + if (pattern != NULL && STRICMP(pattern, "<buffer>") == 0) buflocal_buf = curbuf; /* Check if there is an autocommand with the given pattern. */ @@ -9515,9 +9510,10 @@ au_exists(arg) /* For buffer-local autocommands, fnamecmp() works fine. */ if (ap->pat != NULL && ap->cmds != NULL && (group == AUGROUP_ALL || ap->group == group) - && (buflocal_buf == NULL - ? fnamecmp(ap->pat, pattern) == 0 - : ap->buflocal_nr == buflocal_buf->b_fnum)) + && (pattern == NULL + || (buflocal_buf == NULL + ? fnamecmp(ap->pat, pattern) == 0 + : ap->buflocal_nr == buflocal_buf->b_fnum))) { retval = TRUE; break; |