about summary refs log tree commit diff
path: root/Completion/Core/_setup
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-08 14:11:04 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-08 14:11:04 +0000
commit828dbe71c85bd64e179c63a04c71d0baa9ed714c (patch)
tree2d4dbd00dcf20cfb39c242ef9d763d8ba80e2f9e /Completion/Core/_setup
parentf55f6cd3b39989075ce2abfe6b2684fa16fef946 (diff)
downloadzsh-828dbe71c85bd64e179c63a04c71d0baa9ed714c.tar.gz
zsh-828dbe71c85bd64e179c63a04c71d0baa9ed714c.tar.xz
zsh-828dbe71c85bd64e179c63a04c71d0baa9ed714c.zip
manual/8944
Diffstat (limited to 'Completion/Core/_setup')
-rw-r--r--Completion/Core/_setup12
1 files changed, 11 insertions, 1 deletions
diff --git a/Completion/Core/_setup b/Completion/Core/_setup
index dfd1b4127..bdef1bf8e 100644
--- a/Completion/Core/_setup
+++ b/Completion/Core/_setup
@@ -1,6 +1,6 @@
 #autoload
 
-local val
+local val nm="$compstate[nmatches]"
 
 if _style -a "$1" list-colors val; then
   if [[ "$1" = default ]]; then
@@ -49,3 +49,13 @@ if _style -s "$1" accept-exact val; then
 else
   compstate[exact]="$_saved_exact"
 fi
+
+[[ _last_nmatches -ge 0 && _last_nmatches -ne nm ]] &&
+    _menu_style=( "$_last_menu_style[@]" "$_menu_style[@]" )
+
+if _style -a "$1" menu val; then
+  _last_nmatches="$nm"
+  _last_menu_style=( "$val[@]" )
+else
+  _last_nmatches=-1
+fi