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

Re: PATCH: Re: Broken completion with UTF-8 description



Andrey Borzenkov wrote:
> How are matches sorted currently? Do we have another function doing collate 
> sort or completion simply sorts in numerical order? I am not sure if using 
> strpcmp is the right thing but this is the first I caught.

Did you take a look at strbpcmp() in zle_tricky.c?

> Please review as I am not sure is usage of ztrdup/zfree is right in this case
> .

It'll work, but the standard completion system trick seems to be to
dupstring() and not worry about the temporary usage.

You'll appreciate that it's not that easy to understand the completion
code simply by looking at it, but I didn't see anything that looked
obviously stupid.

> +/*
> + * FIXME this should be defined globally. I have to find other places
> + * where it is used
> + * */
> +
> +#define INTERMATCH_GAP 2

Ah, I see you've found another undocumented magic number used without
any indication.  I found a few of those.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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