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

Re: Crash in reverse-menu-complete with menu-selection



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