mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 13:08:33 +00:00
refactor: convert macros to all-caps (#17895)
Closes https://github.com/neovim/neovim/issues/6297
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user