zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Re: menu-select in 3.1.9
@ 2000-06-14  6:38 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-06-14  6:38 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> On Jun 13,  8:37pm, Andy Spiegl wrote:
> > Subject: menu-select in 3.1.9
> > Hi!
> > I just upgraded from 3.1.7-pre4 to 3.1.9 and menu-selection isn't working
> > anymore. :-(
> 
> Hmm, I just noticed that it's not working for me, either.  <C-x?> output
> shows that MENUSELECT=6 is happening at _main_complete line 217, and the
> number of matches is 71, and the complist module is loaded.

That was caused by 11850 (sorry, I was rather confused yesterday, I
should have noticed...).

> There's this odd bit:
> 
> +_main_complete:152: nm=71
> +_main_complete:154:if: [[  == keep || nm -gt 1 ]]
> +_main_complete:155:then: [[ _last_nmatches -ge 0 && _last_nmatches -ne nm ]]
> +_main_complete:156:then cmdand: _menu_style=( select=6  )
> +_main_complete:158:then: tmp=27
> +_main_complete:160:then: _menu_style=( select=6  select=6 )
> 
> Why is it in there twice?  Doesn't seem to be the cause of the problem.

That's because it gets it once for the default tag and once for the
real tag.

Bye
 Sven

Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.26
diff -u -r1.26 complist.c
--- Src/Zle/complist.c	2000/06/13 10:49:19	1.26
+++ Src/Zle/complist.c	2000/06/14 06:37:56
@@ -1493,6 +1493,8 @@
 
     amatches = dat->matches;
 
+    noselect = 0;
+
     if ((minfo.asked == 2 && mselect < 0) || nlnct >= lines) {
 	showinglist = 0;
 	amatches = oamatches;
@@ -1629,8 +1631,6 @@
     int space, lbeg = 0, step = 1, wrap, pl = nlnct, broken = 0, first = 1;
     char *s;
 
-    if (!mtab)
-	return 0;
     if (fdat || (dummy && (!(s = getsparam("MENUSELECT")) ||
 			   (dat && dat->num < atoi(s))))) {
 	if (fdat) {
@@ -1651,7 +1651,7 @@
     mhasstat = (mstatus && *mstatus);
     fdat = dat;
     selectlocalmap(mskeymap);
-    noselect = 0;
+    noselect = 1;
     while ((menuacc &&
 	    !hasbrpsfx(*(minfo.cur), minfo.prebr, minfo.postbr)) ||
 	   (((*minfo.cur)->flags & (CMF_NOLIST | CMF_MULT)) &&

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-06-14  9:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-14  6:38 PATCH: Re: menu-select in 3.1.9 Sven Wischnowsky

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).