forked from aniani/vim
patch 9.0.0343: ColorScheme autocommand triggered when colorscheme not found
Problem: ColorScheme autocommand triggered when colorscheme is not found. (Romain Lafourcade) Solution: Only trigger ColorScheme when loading the colorscheme succeeds. (closes #11024)
This commit is contained in:
@@ -507,7 +507,9 @@ load_colors(char_u *name)
|
||||
sprintf((char *)buf, "colors/%s.vim", name);
|
||||
retval = source_runtime(buf, DIP_START + DIP_OPT);
|
||||
vim_free(buf);
|
||||
apply_autocmds(EVENT_COLORSCHEME, name, curbuf->b_fname, FALSE, curbuf);
|
||||
if (retval == OK)
|
||||
apply_autocmds(EVENT_COLORSCHEME, name, curbuf->b_fname,
|
||||
FALSE, curbuf);
|
||||
}
|
||||
recursive = FALSE;
|
||||
|
||||
|
Reference in New Issue
Block a user