Matthew Wozniski wrote:

> To reproduce:
> 
> vim -u NONE -U NONE
> :set ignorecase infercase
> ia<CR><CR><C-X><C-L><C-X><C-L>
> 
> After the first <C-X><C-L>, we have
> 1. "a"
> 2. ""
> 3. "a"
> 
> the 2nd <C-X><C-L> tries to complete the string on line 2.  This
> results in a place where we try to allocate 0 space to hold an empty
> string (at edit.c:2151).
> 
> The fix is as easy as the explanation; we just add a new condition
> that results in skipping case inference for an empty string.
> 
> 2114c2114
> <     if (p_ic && curbuf->b_p_inf)
> ---
> >     if (p_ic && curbuf->b_p_inf && len > 0)

Thanks for the clear explanation.  And this looks like the right way to
fix this.

-- 
hundred-and-one symptoms of being an internet addict:
85. Choice between paying Compuserve bill and paying for kids education
    is a no brainer -- although a bit painful for your kids.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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