mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +00:00
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -2396,7 +2396,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>, path_fnamecmp() will work fine
|
||||
if (pattern != NULL && STRICMP(pattern, "<buffer>") == 0) {
|
||||
buflocal_buf = curbuf;
|
||||
}
|
||||
@@ -2404,12 +2404,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, path_fnamecmp() works fine.
|
||||
if (ap->pat != NULL && ap->cmds != NULL
|
||||
&& (group == AUGROUP_ALL || ap->group == group)
|
||||
&& (pattern == NULL
|
||||
|| (buflocal_buf == NULL
|
||||
? FNAMECMP(ap->pat, pattern) == 0
|
||||
? path_fnamecmp(ap->pat, pattern) == 0
|
||||
: ap->buflocal_nr == buflocal_buf->b_fnum))) {
|
||||
retval = true;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user