Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Crash in reverse-menu-complete with menu-selection
- X-seq: zsh-workers 28219
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Crash in reverse-menu-complete with menu-selection
- Date: Tue, 31 Aug 2010 19:12:54 +0100
- In-reply-to: <AANLkTikB0H4b+7sygv8fS+yrxwD6Ua+66FAML6vwNK5C@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <AANLkTikuH91W+P4bWKTEVzW=gtBZQfPwDJQphKyy=mz1@xxxxxxxxxxxxxx>	<100824081606.ZM28228@xxxxxxxxxxxxxxxxxxxxxx>	<AANLkTik+UHjVpnwq7LiKQrRZQJQGDi0t+1J3zKWEwLJq@xxxxxxxxxxxxxx>	<100824094939.ZM28482@xxxxxxxxxxxxxxxxxxxxxx>	<AANLkTikB0H4b+7sygv8fS+yrxwD6Ua+66FAML6vwNK5C@xxxxxxxxxxxxxx>
On Tue, 24 Aug 2010 19:38:21 +0200
> Hmm... this fixes it (ie, this specific case) but I have absolutely no
> idea which of these functions expect the line to be metafied and
> unmetafied, and who is doing it wrong.
> 
> diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
> index bac072e..37ccc7b 100644
> --- a/Src/Zle/complist.c
> +++ b/Src/Zle/complist.c
> @@ -3217,7 +3217,9 @@ domenuselect(Hookdef dummy, Chdata dat)
>                    !strcmp(cmd->nam, "reverse-menu-complete")) {
>              mode = 0;
>             comprecursive = 1;
> +            unmetafy_line();
>             reversemenucomplete(zlenoargs);
> +            metafy_line();
>             mselect = (*(minfo.cur))->gnum;
>             setwish = 1;
Thanks.  This looks right.  The guts of completion have the line
metafied because they deal with null-terminated strings from the main
shell.  The main entry point to reversemenucomplete() from Zle would
have it unmetafied because Zle deals in indvidual characters /
codepoints (the debug check happens further in when it hits
domenucomplete()).  The boundary between the two is incredibly tortuous.
-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author