From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: Crash in reverse-menu-complete with menu-selection
Date: Tue, 31 Aug 2010 19:12:54 +0100 [thread overview]
Message-ID: <20100831191254.211b2ea5@pws-pc> (raw)
In-Reply-To: <AANLkTikB0H4b+7sygv8fS+yrxwD6Ua+66FAML6vwNK5C@mail.gmail.com>
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@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
prev parent reply other threads:[~2010-08-31 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-24 13:48 Mikael Magnusson
2010-08-24 15:16 ` Bart Schaefer
2010-08-24 15:23 ` Mikael Magnusson
2010-08-24 16:49 ` Bart Schaefer
2010-08-24 17:38 ` Mikael Magnusson
2010-08-31 18:12 ` Peter Stephenson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100831191254.211b2ea5@pws-pc \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).