mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-01 07:31:20 +02:00
38043: allow any completion widget to cycle matches for menu completion to fix reverse menu completion
This commit is contained in:
parent
28c46c1bfb
commit
8c29b34032
4 changed files with 9 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2016-03-07 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* 38043: Src/Zle/compcore.c, Src/Zle/complist.c,
|
||||||
|
Src/Zle/zle_tricky.c: allow any completion widget to cycle matches
|
||||||
|
for menu completion to fix reverse menu completion
|
||||||
|
|
||||||
2016-03-07 Peter Stephenson <p.stephenson@samsung.com>
|
2016-03-07 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* 38111: Src/parse.c: remove redundant return values from
|
* 38111: Src/parse.c: remove redundant return values from
|
||||||
|
|
|
@ -30,10 +30,6 @@
|
||||||
#include "complete.mdh"
|
#include "complete.mdh"
|
||||||
#include "compcore.pro"
|
#include "compcore.pro"
|
||||||
|
|
||||||
/* The last completion widget called. */
|
|
||||||
|
|
||||||
static Widget lastcompwidget;
|
|
||||||
|
|
||||||
/* Flags saying what we have to do with the result. */
|
/* Flags saying what we have to do with the result. */
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
|
@ -471,8 +467,7 @@ before_complete(UNUSED(Hookdef dummy), int *lst)
|
||||||
|
|
||||||
/* If we are doing a menu-completion... */
|
/* If we are doing a menu-completion... */
|
||||||
|
|
||||||
if (minfo.cur && menucmp && *lst != COMP_LIST_EXPAND &&
|
if (minfo.cur && menucmp && *lst != COMP_LIST_EXPAND) {
|
||||||
(menucmp != 1 || !compwidget || compwidget == lastcompwidget)) {
|
|
||||||
do_menucmp(*lst);
|
do_menucmp(*lst);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -481,7 +476,6 @@ before_complete(UNUSED(Hookdef dummy), int *lst)
|
||||||
onlyexpl = listdat.valid = 0;
|
onlyexpl = listdat.valid = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
lastcompwidget = compwidget;
|
|
||||||
|
|
||||||
/* We may have to reset the cursor to its position after the *
|
/* We may have to reset the cursor to its position after the *
|
||||||
* string inserted by the last completion. */
|
* string inserted by the last completion. */
|
||||||
|
|
|
@ -3399,7 +3399,7 @@ domenuselect(Hookdef dummy, Chdata dat)
|
||||||
do_single(*(minfo.cur));
|
do_single(*(minfo.cur));
|
||||||
}
|
}
|
||||||
if (wasnext || broken) {
|
if (wasnext || broken) {
|
||||||
menucmp = 2;
|
menucmp = 1;
|
||||||
showinglist = ((validlist && !nolist) ? -2 : 0);
|
showinglist = ((validlist && !nolist) ? -2 : 0);
|
||||||
minfo.asked = 0;
|
minfo.asked = 0;
|
||||||
if (!noselect) {
|
if (!noselect) {
|
||||||
|
|
|
@ -100,8 +100,7 @@ mod_export int usemenu, useglob;
|
||||||
/**/
|
/**/
|
||||||
mod_export int wouldinstab;
|
mod_export int wouldinstab;
|
||||||
|
|
||||||
/* != 0 if we are in the middle of a menu completion. May be == 2 to force *
|
/* != 0 if we are in the middle of a menu completion. */
|
||||||
* menu completion even if using different widgets. */
|
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
mod_export int menucmp;
|
mod_export int menucmp;
|
||||||
|
|
Loading…
Reference in a new issue