From 3d9d13e918c195f974ff7b2f1dc5b65f6b20a441 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 22 Nov 1999 12:29:47 +0000 Subject: zsh-workers/8720 --- Completion/Core/_oldlist | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'Completion/Core/_oldlist') diff --git a/Completion/Core/_oldlist b/Completion/Core/_oldlist index 2408613da..ba57ed6b4 100644 --- a/Completion/Core/_oldlist +++ b/Completion/Core/_oldlist @@ -1,13 +1,8 @@ #autoload -local curcontext="$curcontext" list menu - -# Probably set initial context. - -[[ -z "$curcontext" ]] && curcontext=':oldlist' +local curcontext="${curcontext}:oldlist" list _style -s '' list list -_style -s '' menu menu # If this is a listing widget and there is already an old list, # and either the style :oldlist:list is `always', or it is not `never' @@ -33,16 +28,12 @@ if [[ -n $compstate[old_list] && $list != never ]]; then fi # If this is a completion widget, and we have a completion inserted already, -# and the style :oldlist:menu is not never, then we cycle through the +# and the style :oldlist:menu is `true', then we cycle through the # existing list (even if it was generated by another widget). -if [[ $menu = verbose && - $LASTWIDGET = _verbose_list && $WIDGET != _verbose_list && - -z $compstate[old_insert] && - -n $compstate[old_list] ]]; then +if [[ -z $compstate[old_insert] && -n $compstate[old_list] ]]; then compstate[old_list]=keep -elif [[ $WIDGET = *complete(|-prefix|-word) && - $menu != (never|verbose) ]]; then +elif [[ $WIDGET = *complete(|-prefix|-word) ]] && _style '' menu; then if [[ -n $compstate[old_insert] ]]; then compstate[old_list]=keep if [[ $WIDGET = *reverse* ]]; then -- cgit 1.4.1