components/zsh/patches/23199587.patch
changeset 7589 7eccd056eff6
parent 7586 3db1c2ef2aa9
child 7590 5461fab14904
equal deleted inserted replaced
7586:3db1c2ef2aa9 7589:7eccd056eff6
     1 commit 8c29b34032ebb714d2c593286aa29e5c64be55ab
       
     2 Author: Oliver Kiddle <[email protected]>
       
     3 Date:   Mon Mar 7 13:15:40 2016 +0100
       
     4 
       
     5     38043: allow any completion widget to cycle matches for menu completion to fix reverse menu completion
       
     6 
       
     7 diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
       
     8 index ae3a640..ae7068f 100644
       
     9 --- a/Src/Zle/compcore.c
       
    10 +++ b/Src/Zle/compcore.c
       
    11 @@ -30,10 +30,6 @@
       
    12  #include "complete.mdh"
       
    13  #include "compcore.pro"
       
    14  
       
    15 -/* The last completion widget called. */
       
    16 -
       
    17 -static Widget lastcompwidget;
       
    18 -
       
    19  /* Flags saying what we have to do with the result. */
       
    20  
       
    21  /**/
       
    22 @@ -471,8 +467,7 @@ before_complete(UNUSED(Hookdef dummy), int *lst)
       
    23  
       
    24      /* If we are doing a menu-completion... */
       
    25  
       
    26 -    if (minfo.cur && menucmp && *lst != COMP_LIST_EXPAND && 
       
    27 -	(menucmp != 1 || !compwidget || compwidget == lastcompwidget)) {
       
    28 +    if (minfo.cur && menucmp && *lst != COMP_LIST_EXPAND) {
       
    29  	do_menucmp(*lst);
       
    30  	return 1;
       
    31      }
       
    32 @@ -481,7 +476,6 @@ before_complete(UNUSED(Hookdef dummy), int *lst)
       
    33  	onlyexpl = listdat.valid = 0;
       
    34  	return 1;
       
    35      }
       
    36 -    lastcompwidget = compwidget;
       
    37  
       
    38      /* We may have to reset the cursor to its position after the   *
       
    39       * string inserted by the last completion. */
       
    40 diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
       
    41 index 162436b..8aeb6c3 100644
       
    42 --- a/Src/Zle/complist.c
       
    43 +++ b/Src/Zle/complist.c
       
    44 @@ -3399,7 +3399,7 @@ domenuselect(Hookdef dummy, Chdata dat)
       
    45  	do_single(*(minfo.cur));
       
    46      }
       
    47      if (wasnext || broken) {
       
    48 -	menucmp = 2;
       
    49 +	menucmp = 1;
       
    50  	showinglist = ((validlist && !nolist) ? -2 : 0);
       
    51  	minfo.asked = 0;
       
    52  	if (!noselect) {
       
    53 diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
       
    54 index cc4b7d6..a89b2a3 100644
       
    55 --- a/Src/Zle/zle_tricky.c
       
    56 +++ b/Src/Zle/zle_tricky.c
       
    57 @@ -100,8 +100,7 @@ mod_export int usemenu, useglob;
       
    58  /**/
       
    59  mod_export int wouldinstab;
       
    60  
       
    61 -/* != 0 if we are in the middle of a menu completion. May be == 2 to force *
       
    62 - * menu completion even if using different widgets.                        */
       
    63 +/* != 0 if we are in the middle of a menu completion. */
       
    64  
       
    65  /**/
       
    66  mod_export int menucmp;