Dominique Pelle wrote:

> Doing ":set t_Co=256" causes to the color scheme to be
> sourced.  That's fine when value of t_Co changes, but if
> value of t_Co is set to the same value as previous value, it
> seems useless.
> 
> Sourcing color scheme script can be slow.  Attached patch
> avoids to re-source colorscheme if t_Co is set to the same
> value as it was already.
> 
> I noticed this while tweaking my ~/.vimrc.  When doing ":so ~/.vimrc",
> my color scheme was executed 3 times at each invocation of
> ":so ~/.vimrc":
> 
> - when doing ":set t_Co=256"
> - when doing ":syntax on"
> - and of course when doing ":colorscheme foobar"
> 
> Doing ":unset g:colors_name" at beginning of ~/.vimrc avoids
> this.  But I also think that the patch can have some value if
> some script or user change t_Co.

Thanks, I'll include it.

-- 
hundred-and-one symptoms of being an internet addict:
232. You start conversations with, "Have you gotten an ISDN line?"

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui