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

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



On 24 August 2010 18:49, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Aug 24,  5:23pm, Mikael Magnusson wrote:
> }
> } > I can't reproduce, but when I hit that first ctrl-f I still get nothing,
> } > as reported in the earlier thread about menu-select crashing.
> }
> } Which one?
>
> Starts with workers/28150, here:
> http://www.zsh.org/mla/workers/2010/msg00599.html
> Get's interesting 28158, here:
> http://www.zsh.org/mla/workers/2010/msg00607.html

Compiling with --enable-zsh-debug prints zle_utils.c:1153: line
metafied which means... something? It looks like one of zleline and
zlemetaline is always NULL, and at this point the wrong one is.

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;

-- 
Mikael Magnusson



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