about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 11:21:50 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 11:21:50 +0000
commite42717d18f331489e4c5fcdaefe7edbb3f58ac96 (patch)
tree6fad6bb7850988035a3c3f96ad4fb9ae173544d5 /Completion
parent3143ec4202a7a4f73ba1e9bdde0df459245b7ba0 (diff)
downloadzsh-e42717d18f331489e4c5fcdaefe7edbb3f58ac96.tar.gz
zsh-e42717d18f331489e4c5fcdaefe7edbb3f58ac96.tar.xz
zsh-e42717d18f331489e4c5fcdaefe7edbb3f58ac96.zip
make _message independent of when it is called (11188)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_main_complete5
-rw-r--r--Completion/Core/_message5
2 files changed, 5 insertions, 5 deletions
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