summaryrefslogtreecommitdiffstats
path: root/patches/source/vim/patches/7.4.109
blob: 70ed86d238db15f4173a8dffe3b6c5fd97561ad0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
To: vim_dev@googlegroups.com
Subject: Patch 7.4.109
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.4.109
Problem:    ColorScheme autocommand matches with the current buffer name.
Solution:   Match with the colorscheme name. (Christian Brabandt)
Files:	    runtime/doc/autocmd.txt, src/fileio.c, src/syntax.c


*** ../vim-7.4.108/runtime/doc/autocmd.txt	2013-08-10 13:24:52.000000000 +0200
--- runtime/doc/autocmd.txt	2013-11-28 18:44:20.000000000 +0100
***************
*** 480,485 ****
--- 480,491 ----
  				|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
*** ../vim-7.4.108/src/fileio.c	2013-11-12 18:09:20.000000000 +0100
--- src/fileio.c	2013-11-28 18:44:20.000000000 +0100
***************
*** 9330,9336 ****
       */
      if (fname_io == NULL)
      {
! 	if (fname != NULL && *fname != NUL)
  	    autocmd_fname = fname;
  	else if (buf != NULL)
  	    autocmd_fname = buf->b_ffname;
--- 9330,9338 ----
       */
      if (fname_io == NULL)
      {
! 	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,9396 ****
      else
      {
  	sfname = vim_strsave(fname);
! 	/* Don't try expanding FileType, Syntax, FuncUndefined, WindowID or
! 	 * QuickFixCmd* */
  	if (event == EVENT_FILETYPE
  		|| event == EVENT_SYNTAX
  		|| event == EVENT_FUNCUNDEFINED
  		|| event == EVENT_REMOTEREPLY
  		|| event == EVENT_SPELLFILEMISSING
  		|| event == EVENT_QUICKFIXCMDPRE
  		|| event == EVENT_QUICKFIXCMDPOST)
  	    fname = vim_strsave(fname);
  	else
--- 9385,9399 ----
      else
      {
  	sfname = vim_strsave(fname);
! 	/* 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
*** ../vim-7.4.108/src/syntax.c	2013-06-08 16:10:08.000000000 +0200
--- src/syntax.c	2013-11-28 18:44:20.000000000 +0100
***************
*** 7071,7077 ****
  	retval = source_runtime(buf, FALSE);
  	vim_free(buf);
  #ifdef FEAT_AUTOCMD
! 	apply_autocmds(EVENT_COLORSCHEME, NULL, NULL, FALSE, curbuf);
  #endif
      }
      recursive = FALSE;
--- 7071,7077 ----
  	retval = source_runtime(buf, FALSE);
  	vim_free(buf);
  #ifdef FEAT_AUTOCMD
! 	apply_autocmds(EVENT_COLORSCHEME, name, curbuf->b_fname, FALSE, curbuf);
  #endif
      }
      recursive = FALSE;
*** ../vim-7.4.108/src/version.c	2013-11-28 17:41:41.000000000 +0100
--- src/version.c	2013-11-28 18:48:42.000000000 +0100
***************
*** 740,741 ****
--- 740,743 ----
  {   /* Add new patch number below this line */
+ /**/
+     109,
  /**/

-- 
"How is your new girlfriend?"
"90-60-90 man!"
"What, pale purple?"

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///