diff options
Diffstat (limited to 'src/nvim/autocmd.c')
-rw-r--r-- | src/nvim/autocmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c index 173f8e17af..3dc3d3d7a9 100644 --- a/src/nvim/autocmd.c +++ b/src/nvim/autocmd.c @@ -2359,7 +2359,7 @@ bool au_exists(const char *const arg) FUNC_ATTR_WARN_UNUSED_RESULT } // if pattern is "<buffer>", special handling is needed which uses curbuf - // for pattern "<buffer=N>, fnamecmp() will work fine + // for pattern "<buffer=N>, FNAMECMP() will work fine if (pattern != NULL && STRICMP(pattern, "<buffer>") == 0) { buflocal_buf = curbuf; } @@ -2367,12 +2367,12 @@ bool au_exists(const char *const arg) FUNC_ATTR_WARN_UNUSED_RESULT // Check if there is an autocommand with the given pattern. for (; ap != NULL; ap = ap->next) { // only use a pattern when it has not been removed and has commands. - // For buffer-local autocommands, fnamecmp() works fine. + // For buffer-local autocommands, FNAMECMP() works fine. if (ap->pat != NULL && ap->cmds != NULL && (group == AUGROUP_ALL || ap->group == group) && (pattern == NULL || (buflocal_buf == NULL - ? fnamecmp(ap->pat, (char_u *)pattern) == 0 + ? FNAMECMP(ap->pat, (char_u *)pattern) == 0 : ap->buflocal_nr == buflocal_buf->b_fnum))) { retval = true; break; |