summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Core/_main_complete5
-rw-r--r--Completion/Core/_message5
3 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c088e4bc9..6b655052a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
 
 2000-05-05  Sven Wischnowsky  <wischnow@informatik.hu-berlin.de>
 
+	* 11188: Completion/Core/_main_complete, Completion/Core/_message:
+ 	make _message independent of when it is called
+	
 	* 11186: Functions/Misc/nslookup: use `eval' in nslookup for
  	pager, in case someone has PAGER='less -foo' or some such
 	
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index cf2cbb808..c4672b61f 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -21,7 +21,7 @@ unsetopt markdirs globsubst shwordsplit nounset ksharrays
 
 local func funcs ret=1 tmp _compskip format nm \
       _completers _completer _completer_num curtag \
-      _matchers _matcher _matcher_num _comp_tags \
+      _matchers _matcher _matcher_num _comp_tags _comp_mesg \
       context state line opt_args val_args curcontext="$curcontext" \
       _last_nmatches=-1 _last_menu_style _def_menu_style _menu_style sel \
       _saved_exact="${compstate[exact]}" \
@@ -174,6 +174,9 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
       fi
     fi
   fi
+elif [[ nm -eq 0 && -n "$_comp_mesg" ]]; then
+  compstate[insert]=''
+  compstate[list]='list force'
 elif [[ nm -eq 0 &&
         $#_lastdescr -ne 0 && $compstate[old_list] != keep ]] &&
      zstyle -s ":completion:${curcontext}:warnings" format format; then
diff --git a/Completion/Core/_message b/Completion/Core/_message
index 8e1d23679..a7d765a6a 100644
--- a/Completion/Core/_message
+++ b/Completion/Core/_message
@@ -16,8 +16,5 @@ fi
 if [[ -n "$format$raw" ]]; then
   [[ -z "$raw" ]] && zformat -f format "$format" "d:$1" "${(@)argv[2,-1]}"
   compadd -x "$format"
-  if [[ $compstate[nmatches] -eq 0 ]]; then
-    compstate[list]='list force'
-    compstate[insert]=''
-  fi
+  _comp_mesg=yes
 fi