]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-144 v7.2.144
authorBram Moolenaar <Bram@vim.org>
Wed, 18 Mar 2009 13:21:18 +0000 (13:21 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 18 Mar 2009 13:21:18 +0000 (13:21 +0000)
src/option.c
src/version.c

index d3912f83b3ee1f894acccf55d6802907bd7b0a57..cc3363164895bcdcb7eed4d4d2b4dfd80d6ce5ff 100644 (file)
@@ -6022,15 +6022,23 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
        /* ":set t_Co=0" and ":set t_Co=1" do ":set t_Co=" */
        if (varp == &T_CCO)
        {
-           t_colors = atoi((char *)T_CCO);
-           if (t_colors <= 1)
+           int colors = atoi((char *)T_CCO);
+
+           /* Only reinitialize colors if t_Co value has really changed to
+            * avoid expensive reload of colorscheme if t_Co is set to the
+            * same value multiple times. */
+           if (colors != t_colors)
            {
-               if (new_value_alloced)
-                   vim_free(T_CCO);
-               T_CCO = empty_option;
+               t_colors = colors;
+               if (t_colors <= 1)
+               {
+                   if (new_value_alloced)
+                       vim_free(T_CCO);
+                   T_CCO = empty_option;
+               }
+               /* We now have a different color setup, initialize it again. */
+               init_highlight(TRUE, FALSE);
            }
-           /* We now have a different color setup, initialize it again. */
-           init_highlight(TRUE, FALSE);
        }
        ttest(FALSE);
        if (varp == &T_ME)
index 9a96e1a9226f16cdb83f1588c0d126c903d23e36..4873a57e169e66e7441a7d6ad0358776d12a1e6c 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    144,
 /**/
     143,
 /**/