On 30-Oct-2009 Jan Larres <li...@majutsushi.net> wrote: > > Hi Raúl, > > * Raúl Núñez de Arenas Coronado (raul...@gmail.com) wrote: > > Easy to reproduce: > > $ vim -u NONE > > [Vim starts] > > :set isprint=∙ > > > > For the above I use <Ctrl-K> to enter the digraph, then "Sb" for Small > > bullet. As soon as you hit enter after the above: > > Vim: Caught deadly signal SEGV > > Vim: Finished > > [1] 29734 segmentation fault vim -u NONE > > > > It happens with other digraphs, probably all above u+00ff but I haven't > > tested thorougly. > > > > My version of Vim > > > > > > VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Oct 22 2009 12:06:16) > > Included patches: 1-267 > > with my vim (7.2.245 under Linux) I get an error instead: > > E474: Invalid argument: isprint=∙ > > Maybe it got introduced by a patch in between our versions? > > Jan
The problem was introduced by patch 7.2.252. Or actually it was not reproducible before 7.2.252 due to the fact that it was not possible to use multi-byte characters at all. The attached patch fixes the problem. Additionally, it allows to specify a range of multi-byte characters, e.g.: :set isp=ð-÷ -- Cheers, Lech --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
diff --git a/src/charset.c b/src/charset.c index cc02563..dd3c7fe 100644 --- a/src/charset.c +++ b/src/charset.c @@ -187,9 +187,14 @@ buf_init_chartab(buf, global) if (VIM_ISDIGIT(*p)) c2 = getdigits(&p); else - c2 = *p++; +#ifdef FEAT_MBYTE + if (has_mbyte) + c2 = mb_ptr2char_adv(&p); + else +#endif + c2 = *p++; } - if (c <= 0 || (c2 < c && c2 != -1) || c2 >= 256 + if (c <= 0 || c >= 256 || (c2 < c && c2 != -1) || c2 >= 256 || !(*p == NUL || *p == ',')) return FAIL;