2008/7/14 Bram Moolenaar <[EMAIL PROTECTED]>:

> George V. Reilly wrote:
> > I believe I have it this time. ex_helpgrep is setting p_cpo =
> > (char_u*)"", then that's being free'd as a side-effect of an autocmd
> > doing "set cpo&vim".
>
> Good catch.  String options should never be set to a static string,
> unless we are 100% sure nobody can set the option.
>
> I'll change it, also taking care of not restoring the value if it was
> changed in the mean time.
>
> I found a couple of other places with a similar problem.  Unlikely to
> happen, but you never know when someone does weird things.
>

I'd argue that you should never set the string options to a static string at
all. Bypassing the string option allocation mechanism and setting the option
to a static string is a fragile hack. Perhaps you can set p_cpo to
empty_option here, since that already works.
-- 
/George V. Reilly [EMAIL PROTECTED]
http://www.georgevreilly.com/blog http://blogs.cozi.com/tech

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

Raspunde prin e-mail lui