From 2ef449a71d2f681a85453e68b10d3af97dec14ff Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 13 Sep 1999 09:53:59 +0000 Subject: zsh-workers/7797 --- Completion/Core/_oldlist | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'Completion/Core/_oldlist') diff --git a/Completion/Core/_oldlist b/Completion/Core/_oldlist index bdf12f90c..2efc08119 100644 --- a/Completion/Core/_oldlist +++ b/Completion/Core/_oldlist @@ -27,13 +27,23 @@ fi # If this is a completion widget, and we have a completion inserted already, # and the compconfig key oldlist_menu is not never, then we cycle through the # existing list (even if it was generated by another widget). -if [[ -n $compstate[old_insert] && $WIDGET = *complete(|-prefix|-word) && - $compconfig[oldlist_menu] != never ]]; then + +if [[ $compconfig[oldlist_menu] = verbose && + $LASTWIDGET = _verbose_list && $WIDGET != _verbose_list && + -z $compstate[old_insert] && + -n $compstate[old_list] ]]; then compstate[old_list]=keep - if [[ $WIDGET = *reverse* ]]; then - compstate[insert]=$(( compstate[old_insert] - 1 )) +elif [[ $WIDGET = *complete(|-prefix|-word) && + $compconfig[oldlist_menu] != (never|verbose) ]]; then + if [[ -n $compstate[old_insert] ]]; then + compstate[old_list]=keep + if [[ $WIDGET = *reverse* ]]; then + compstate[insert]=$(( compstate[old_insert] - 1 )) + else + compstate[insert]=$(( compstate[old_insert] + 1 )) + fi else - compstate[insert]=$(( compstate[old_insert] + 1 )) + return 1 fi return 0 fi -- cgit 1.4.1