comparison src/option.c @ 1846:cf0979c30caf v7.2.144

updated for version 7.2-144
author vimboss
date Wed, 18 Mar 2009 13:21:18 +0000
parents fbecb12e37f5
children cfcc1421f5e4
comparison
equal deleted inserted replaced
1845:dc81a4fc6318 1846:cf0979c30caf
6020 else if (istermoption(&options[opt_idx]) && full_screen) 6020 else if (istermoption(&options[opt_idx]) && full_screen)
6021 { 6021 {
6022 /* ":set t_Co=0" and ":set t_Co=1" do ":set t_Co=" */ 6022 /* ":set t_Co=0" and ":set t_Co=1" do ":set t_Co=" */
6023 if (varp == &T_CCO) 6023 if (varp == &T_CCO)
6024 { 6024 {
6025 t_colors = atoi((char *)T_CCO); 6025 int colors = atoi((char *)T_CCO);
6026 if (t_colors <= 1) 6026
6027 /* Only reinitialize colors if t_Co value has really changed to
6028 * avoid expensive reload of colorscheme if t_Co is set to the
6029 * same value multiple times. */
6030 if (colors != t_colors)
6027 { 6031 {
6028 if (new_value_alloced) 6032 t_colors = colors;
6029 vim_free(T_CCO); 6033 if (t_colors <= 1)
6030 T_CCO = empty_option; 6034 {
6035 if (new_value_alloced)
6036 vim_free(T_CCO);
6037 T_CCO = empty_option;
6038 }
6039 /* We now have a different color setup, initialize it again. */
6040 init_highlight(TRUE, FALSE);
6031 } 6041 }
6032 /* We now have a different color setup, initialize it again. */
6033 init_highlight(TRUE, FALSE);
6034 } 6042 }
6035 ttest(FALSE); 6043 ttest(FALSE);
6036 if (varp == &T_ME) 6044 if (varp == &T_ME)
6037 { 6045 {
6038 out_str(T_ME); 6046 out_str(T_ME);