]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.109 v7.4.109
authorBram Moolenaar <Bram@vim.org>
Thu, 28 Nov 2013 17:53:52 +0000 (18:53 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 28 Nov 2013 17:53:52 +0000 (18:53 +0100)
Problem:    ColorScheme autocommand matches with the current buffer name.
Solution:   Match with the colorscheme name. (Christian Brabandt)

runtime/doc/autocmd.txt
src/fileio.c
src/syntax.c
src/version.c

index 3384051e2ffd6cd65c58d8e46c67d388195df956..0a9505315324698117f4d41215b6cd519a4ae9a3 100644 (file)
@@ -480,6 +480,12 @@ CmdwinLeave                        Before leaving the command-line window.
                                |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
index 1d030165a0f649718f40883679ce3b14ce47b665..cb22bd31d48f1ae0cd3177bdd2452f1aebeca636 100644 (file)
@@ -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
index a8de63a6e103810d1af7b48f96247c90329abc9d..4352b9df8df78db963184ceb7fea9dd23bc25804 100644 (file)
@@ -7071,7 +7071,7 @@ load_colors(name)
        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;
index b982283aa096956235e4fe6b0c16466e1f19f191..5975135f9ecf2d4c8ecffa1b38ca94731b2a7cd3 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    109,
 /**/
     108,
 /**/