mirror of
https://github.com/neovim/neovim.git
synced 2025-10-15 14:26:07 +00:00
au_get_grouparg() can't fail, remove error handling
This commit is contained in:
@@ -5933,8 +5933,6 @@ void do_autocmd(char_u *arg, int forceit)
|
||||
* Check for a legal group name. If not, use AUGROUP_ALL.
|
||||
*/
|
||||
group = au_get_grouparg(&arg);
|
||||
if (arg == NULL) /* out of memory */
|
||||
return;
|
||||
|
||||
/*
|
||||
* Scan over the events.
|
||||
@@ -6271,8 +6269,6 @@ do_doautocmd (
|
||||
* Check for a legal group name. If not, use AUGROUP_ALL.
|
||||
*/
|
||||
group = au_get_grouparg(&arg);
|
||||
if (arg == NULL) /* out of memory */
|
||||
return FAIL;
|
||||
|
||||
if (*arg == '*') {
|
||||
EMSG(_("E217: Can't execute autocommands for ALL events"));
|
||||
@@ -7204,8 +7200,7 @@ set_context_in_autocmd (
|
||||
include_groups = FALSE;
|
||||
p = arg;
|
||||
group = au_get_grouparg(&arg);
|
||||
if (group == AUGROUP_ERROR)
|
||||
return NULL;
|
||||
|
||||
/* If there only is a group name that's what we expand. */
|
||||
if (*arg == NUL && group != AUGROUP_ALL && !vim_iswhite(arg[-1])) {
|
||||
arg = p;
|
||||
|
Reference in New Issue
Block a user