From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11187 invoked from network); 31 Jan 2000 10:34:39 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Jan 2000 10:34:39 -0000 Received: (qmail 16180 invoked by alias); 31 Jan 2000 10:34:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9489 Received: (qmail 16171 invoked from network); 31 Jan 2000 10:34:30 -0000 Date: Mon, 31 Jan 2000 11:34:28 +0100 (MET) Message-Id: <200001311034.LAA31464@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 31 Jan 2000 03:09:33 +0900 Subject: Re: LISTMAX and menu select 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 > zsh: do you wish to see all 4 possibilities? n > is27e1u11% ls M > 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