|cmdwin-char|
*ColorScheme*
ColorScheme After loading a color scheme. |:colorscheme|
+ The pattern is matched against the
+ colorscheme name. <afile> can be used for the
+ name of the actual file where this option was
+ set, and <amatch> for the new colorscheme
+ name.
+
*CompleteDone*
CompleteDone After Insert mode completion is done. Either
*/
if (fname_io == NULL)
{
- if (fname != NULL && *fname != NUL)
+ if (event == EVENT_COLORSCHEME)
+ autocmd_fname = NULL;
+ else if (fname != NULL && *fname != NUL)
autocmd_fname = fname;
else if (buf != NULL)
autocmd_fname = buf->b_ffname;
else
{
sfname = vim_strsave(fname);
- /* Don't try expanding FileType, Syntax, FuncUndefined, WindowID or
- * QuickFixCmd* */
+ /* Don't try expanding FileType, Syntax, FuncUndefined, WindowID,
+ * ColorScheme or QuickFixCmd* */
if (event == EVENT_FILETYPE
|| event == EVENT_SYNTAX
|| event == EVENT_FUNCUNDEFINED
|| event == EVENT_REMOTEREPLY
|| event == EVENT_SPELLFILEMISSING
|| event == EVENT_QUICKFIXCMDPRE
+ || event == EVENT_COLORSCHEME
|| event == EVENT_QUICKFIXCMDPOST)
fname = vim_strsave(fname);
else
retval = source_runtime(buf, FALSE);
vim_free(buf);
#ifdef FEAT_AUTOCMD
- apply_autocmds(EVENT_COLORSCHEME, NULL, NULL, FALSE, curbuf);
+ apply_autocmds(EVENT_COLORSCHEME, name, curbuf->b_fname, FALSE, curbuf);
#endif
}
recursive = FALSE;