diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-03-18 13:21:18 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-03-18 13:21:18 +0000 |
commit | c84e8952eb4566a1fa9b1d68cc3d554ab8d5b5f3 (patch) | |
tree | 79e8df872998297d40358b246ea0e2c2971f8ee3 /src | |
parent | f4580d80e21e3299bfc71666942f43a5872782ab (diff) | |
download | vim-git-c84e8952eb4566a1fa9b1d68cc3d554ab8d5b5f3.tar.gz |
updated for version 7.2-144v7.2.144
Diffstat (limited to 'src')
-rw-r--r-- | src/option.c | 22 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 17 insertions, 7 deletions
diff --git a/src/option.c b/src/option.c index d3912f83b..cc3363164 100644 --- a/src/option.c +++ b/src/option.c @@ -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) diff --git a/src/version.c b/src/version.c index 9a96e1a92..4873a57e1 100644 --- a/src/version.c +++ b/src/version.c @@ -677,6 +677,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 144, +/**/ 143, /**/ 142, |