zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: "Hiroto Kagotani" <hiroto.kagotani@gmail.com>, zsh-workers@sunsite.dk
Subject: Re: Segmentation fault on Ctrl-D
Date: Wed, 7 May 2008 09:46:26 +0100	[thread overview]
Message-ID: <20080507094626.437d7bc4@news01> (raw)
In-Reply-To: <ca15a72c0805070035v3c872950m85b9f5b377d46196@mail.gmail.com>

On Wed, 7 May 2008 16:35:05 +0900
"Hiroto Kagotani" <hiroto.kagotani@gmail.com> wrote:
> Hi there,
> 
> I'm new to this list so please let me know if I'm missing any important
> information.
> 
> zsh (CVS, 4.3.6, 4.3.4 on FreeBSD, and 4.3.4 on Cygwin) crashes
> when I type a key sequence followed by two Ctrl-D's.
> 
> zsh -f
> q<TAB><TAB><^D><^D>
>  -> Segmentation fault
> 
> "q" may be any letter.  If you have a lot of commands begin with the letter,
> type three <TAB>s to force zsh choose a candidate.

Thanks.  This was a very obvious mistake when I looked.  Unfortunately
old-fashion completion doesn't get the same level of testing as the new
sort nowadays.

Index: Src/Zle/compresult.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v
retrieving revision 1.74
diff -u -r1.74 compresult.c
--- Src/Zle/compresult.c	13 Apr 2008 16:58:42 -0000	1.74
+++ Src/Zle/compresult.c	7 May 2008 08:44:21 -0000
@@ -1188,6 +1188,12 @@
 {
     int was_meta;
 
+    /* Just list the matches if the list was requested. */
+    if (lst == COMP_LIST_COMPLETE) {
+	showinglist = -2;
+	return;
+    }
+
     /* Already metafied when called from domenuselect already */
     if (zlemetaline == NULL) {
 	was_meta = 0;
@@ -1195,12 +1201,6 @@
     } else
 	was_meta = 1;
 
-    /* Just list the matches if the list was requested. */
-    if (lst == COMP_LIST_COMPLETE) {
-	showinglist = -2;
-	return;
-    }
-
     /* Otherwise go to the next match in the array... */
     do {
 	if (!*++(minfo.cur)) {

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


      reply	other threads:[~2008-05-07  8:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07  7:35 Hiroto Kagotani
2008-05-07  8:46 ` 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=20080507094626.437d7bc4@news01 \
    --to=pws@csr.com \
    --cc=hiroto.kagotani@gmail.com \
    --cc=zsh-workers@sunsite.dk \
    /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).