Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: crash in completing code with unicode support



On Tue, Aug 16, 2005 at 11:27:49PM +0400, Andrey Borzenkov wrote:
>                     p = compprefix + 1;
>                     if (*p == Meta)
>                         p += 2;

I haven't tried to fully grok that code yet, but it looks to me like the
non-meta case results in just the character at compprefix being sent to
pattry(), so shouldn't the code really be checking if the compprefix
character is metified or not?

    p = compprefix + 1 + (*compprefix == Meta);

Also, the following check (from slightly lower down) needs to be changed
to handle the potential for the pointer to be bumped further forward:

    if (p == compprefix + l)

If the above is right, then this line should probably be changed to be:

    if (p == compprefix + l + (*compprefix == Meta))

..wayne..



Messages sorted by: Reverse Date, Date, Thread, Author