about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_main_complete4
1 files changed, 3 insertions, 1 deletions
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