1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 21:44:11 +01:00

make user defined completion widgets leave menu selection without accepting the currently selected match (12959)

This commit is contained in:
Sven Wischnowsky 2000-10-11 10:57:40 +00:00
parent e1fb97ee44
commit 5d8adbee07
3 changed files with 19 additions and 5 deletions

@ -1,3 +1,9 @@
2000-10-11 Sven Wischnowsky <wischnow@zsh.org>
* 12959: Src/Zle/compcore.c, Src/Zle/complist.c: make user defined
completion widgets leave menu selection without accepting the
currently selected match
2000-10-10 Sven Wischnowsky <wischnow@zsh.org>
* 12948: Completion/Core/_expand: follow-up to 12942, only a

@ -524,14 +524,16 @@ after_complete(Hookdef dummy, int *dat)
dat[1] = 0;
menucmp = menuacc = 0;
minfo.cur = NULL;
if (ret == 2) {
if (ret >= 2) {
fixsuffix();
cs = 0;
foredel(ll);
inststr(origline);
cs = origcs;
clearlist = 1;
invalidatelist();
if (ret == 2) {
clearlist = 1;
invalidatelist();
}
}
}
}

@ -2237,7 +2237,11 @@ domenuselect(Hookdef dummy, Chdata dat)
continue;
} else {
ungetkeycmd();
acc = 1;
if (cmd->widget && (cmd->widget->flags & WIDGET_NCOMP)) {
acc = 0;
broken = 2;
} else
acc = 1;
break;
}
do_single(**p);
@ -2260,6 +2264,7 @@ domenuselect(Hookdef dummy, Chdata dat)
menucmp = 2;
showinglist = -2;
minfo.asked = 0;
zrefresh();
}
if (!noselect && (!dat || acc)) {
showinglist = -2;
@ -2271,7 +2276,8 @@ domenuselect(Hookdef dummy, Chdata dat)
mlbeg = -1;
fdat = NULL;
return ((dat && !broken) ? (acc ? 1 : 2) : (!noselect ^ acc));
return (broken == 2 ? 3 :
((dat && !broken) ? (acc ? 1 : 2) : (!noselect ^ acc)));
}
/* The widget function. */