From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19720 invoked from network); 27 Oct 1999 08:24:11 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Oct 1999 08:24:11 -0000 Received: (qmail 25972 invoked by alias); 27 Oct 1999 08:22:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8437 Received: (qmail 25964 invoked from network); 27 Oct 1999 08:22:12 -0000 Date: Wed, 27 Oct 1999 10:18:32 +0200 (MET DST) Message-Id: <199910270818.KAA15257@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Tue, 26 Oct 1999 16:29:03 +0000 Subject: PATCH: Re: BUG: coredump with menu-select and LIST_PACKED Bart Schaefer wrote: > The instructions that Alexandre gave were exactly what I did to produce > the stack trace. I finally had the idea that `M-m' was bound to `menu-select' and after a bit of trying, I finally could reproduce it. The problem was that the data wasn't re-calculated when the new list of matches was generated. But before I found that, I found another problem with menu-select -- there still was a reference to `ZLS_SELECT'. I have no idea how this survived. Bye Sven diff -u os/Zle/complist.c Src/Zle/complist.c --- os/Zle/complist.c Tue Oct 26 13:11:00 1999 +++ Src/Zle/complist.c Wed Oct 27 09:56:50 1999 @@ -251,6 +251,7 @@ /* Information about the list shown. */ static int noselect, mselect, inselect, mcol, mline, mcols, mlines, mmlen; +static int selected; static Cmatch **mtab, **mmtabp; static Cmgroup *mgtab, *mgtabp; static struct listcols mcolors; @@ -567,6 +568,7 @@ inselect = 1; if (noselect) break; + selected = 1; if (!i) { i = mcols * mlines; while (i--) @@ -876,8 +878,9 @@ int d = 0; if (!minfo.cur) { + selected = 0; menucomplete(args); - if ((minfo.cur && minfo.asked == 2) || getsparam("ZLS_SELECT")) + if ((minfo.cur && minfo.asked == 2) || selected) return 0; d = 1; } diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c --- os/Zle/zle_tricky.c Tue Oct 26 13:11:01 1999 +++ Src/Zle/zle_tricky.c Wed Oct 27 10:14:21 1999 @@ -5915,6 +5915,7 @@ hasperm = 1; permmnum = mn - 1; permgnum = gn - 1; + listdat.valid = 0; return fi; } -- Sven Wischnowsky wischnow@informatik.hu-berlin.de