]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.144
- new
[packages/vim.git] / 7.2.144
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.144
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.2.144
11 Problem:    When 't_Co' is set to the value it already had the color scheme is
12             reloaded anyway.
13 Solution:   Only load the colorscheme when the t_Co value changes. (Dominique
14             Pelle)
15 Files:      src/option.c
16
17
18 *** ../vim-7.2.143/src/option.c Wed Mar  4 04:11:56 2009
19 --- src/option.c        Wed Mar 18 12:00:28 2009
20 ***************
21 *** 6022,6036 ****
22         /* ":set t_Co=0" and ":set t_Co=1" do ":set t_Co=" */
23         if (varp == &T_CCO)
24         {
25 !           t_colors = atoi((char *)T_CCO);
26 !           if (t_colors <= 1)
27             {
28 !               if (new_value_alloced)
29 !                   vim_free(T_CCO);
30 !               T_CCO = empty_option;
31             }
32 -           /* We now have a different color setup, initialize it again. */
33 -           init_highlight(TRUE, FALSE);
34         }
35         ttest(FALSE);
36         if (varp == &T_ME)
37 --- 6022,6044 ----
38         /* ":set t_Co=0" and ":set t_Co=1" do ":set t_Co=" */
39         if (varp == &T_CCO)
40         {
41 !           int colors = atoi((char *)T_CCO);
42
43 !           /* Only reinitialize colors if t_Co value has really changed to
44 !            * avoid expensive reload of colorscheme if t_Co is set to the
45 !            * same value multiple times. */
46 !           if (colors != t_colors)
47             {
48 !               t_colors = colors;
49 !               if (t_colors <= 1)
50 !               {
51 !                   if (new_value_alloced)
52 !                       vim_free(T_CCO);
53 !                   T_CCO = empty_option;
54 !               }
55 !               /* We now have a different color setup, initialize it again. */
56 !               init_highlight(TRUE, FALSE);
57             }
58         }
59         ttest(FALSE);
60         if (varp == &T_ME)
61 *** ../vim-7.2.143/src/version.c        Wed Mar 18 12:50:58 2009
62 --- src/version.c       Wed Mar 18 14:16:48 2009
63 ***************
64 *** 678,679 ****
65 --- 678,681 ----
66   {   /* Add new patch number below this line */
67 + /**/
68 +     144,
69   /**/
70
71 -- 
72 hundred-and-one symptoms of being an internet addict:
73 235. You start naming your kids Pascal, COBOL, Algol and Fortran.
74
75  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
76 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
77 \\\        download, build and distribute -- http://www.A-A-P.org        ///
78  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.038175 seconds and 3 git commands to generate.