zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: LISTMAX and menu select
Date: Mon, 31 Jan 2000 11:34:28 +0100 (MET)	[thread overview]
Message-ID: <200001311034.LAA31464@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 31 Jan 2000 03:09:33 +0900


Tanaka Akira wrote:

> zsh dumps core as follows.
> 
> Z(2):akr@is27e1u11% Src/zsh -f
> is27e1u11% bindkey -e; autoload -U compinit; compinit -D
> is27e1u11% zstyle ':completion*:default' menu select=1
> is27e1u11% LISTMAX=2
> is27e1u11% ls M<TAB>
> zsh: do you wish to see all 4 possibilities? n
> is27e1u11% ls M<TAB>
> zsh: do you wish to see all 4 possibilities? n
> is27e1u11% ls META-FAQzsh: segmentation fault (core dumped)  Src/zsh -f

complist didn't use the answer correctly (it tried to menu-select with 
no list).

The patch also tries to avoid asking the same question a second time
when auto-menu starts. I guess I once had a reason for the tests in
asklist(), but they look wrong.

Bye
 Sven

diff -ru ../z.old/Src/Zle/complist.c Src/Zle/complist.c
--- ../z.old/Src/Zle/complist.c	Mon Jan 31 10:49:50 2000
+++ Src/Zle/complist.c	Mon Jan 31 11:14:04 2000
@@ -782,7 +782,7 @@
 
     if (asklist()) {
 	amatches = oamatches;
-	return 1;
+	return (noselect = 1);
     }
     if (mselect >= 0) {
 	int i;
diff -ru ../z.old/Src/Zle/compresult.c Src/Zle/compresult.c
--- ../z.old/Src/Zle/compresult.c	Mon Jan 31 10:49:51 2000
+++ Src/Zle/compresult.c	Mon Jan 31 11:31:22 2000
@@ -1541,8 +1541,7 @@
 		tcmultout(TCUP, TCMULTUP, nlnct);
 	    } else
 		putc('\n', shout);
-	    if (minfo.cur)
-		minfo.asked = 2;
+	    minfo.asked = 2;
 	    return 1;
 	}
 	if (clearflag) {
@@ -1553,10 +1552,9 @@
 	} else
 	    putc('\n', shout);
 	settyinfo(&shttyinfo);
-	if (minfo.cur)
-	    minfo.asked = 1;
+	minfo.asked = 1;
     }
-    return 0;
+    return (minfo.asked ? minfo.asked - 1 : 0);
 }
 
 /**/

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-01-31 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-31 10:34 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-01-30 18:09 Tanaka Akira

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=200001311034.LAA31464@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.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).