From 3343c75efdb25e274df824e016b0bb3552b1c0ba Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 27 Jul 2000 10:59:43 +0000 Subject: fix a bug that started menu selection too often; fix bug for `yes=long' and document it (12405) --- Completion/Core/_main_complete | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index 9b0972ca2..7f0e94358 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -177,7 +177,8 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then -n "$_menu_style[(r)(yes|true|on|1)=long-list]" ) ]]; then compstate[insert]=menu elif [[ "$compstate[insert]" = "$_saved_insert" ]]; then - if [[ -n "$_menu_style[(r)(yes|true|1|on)=long]" && tmp -gt LINES ]]; then + if [[ -n "$compstate[insert]" && + -n "$_menu_style[(r)(yes|true|1|on)=long]" && tmp -gt LINES ]]; then compstate[insert]=menu else sel=( "${(@M)_menu_style:#(yes|true|1|on)*}" ) @@ -230,6 +231,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then fi if [[ "$compstate[insert]" = *menu* ]]; then + [[ "$MENUSELECT" = 00 ]] && MENUSELECT=0 if [[ -n "$_menu_style[(r)no-select*]" ]]; then unset MENUSELECT elif [[ -n "$_menu_style[(r)select=long*]" ]]; then -- cgit 1.4.1