summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-11-28 18:53:52 +0100
committerBram Moolenaar <Bram@vim.org>2013-11-28 18:53:52 +0100
commitb95186fd36bae9716181bfdd203fb27f410e3c4f (patch)
tree4c8cdbedaab2c507fcd0dfdafcc677fbc972c7d9 /src/fileio.c
parent34b466edfe6acdf610899da18e81537a8e5d52c8 (diff)
downloadvim-git-b95186fd36bae9716181bfdd203fb27f410e3c4f.tar.gz
updated for version 7.4.109v7.4.109
Problem: ColorScheme autocommand matches with the current buffer name. Solution: Match with the colorscheme name. (Christian Brabandt)
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 1d030165a..cb22bd31d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -9330,7 +9330,9 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
*/
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;
@@ -9383,14 +9385,15 @@ apply_autocmds_group(event, fname, fname_io, force, group, buf, eap)
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