From 828dbe71c85bd64e179c63a04c71d0baa9ed714c Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 8 Dec 1999 14:11:04 +0000 Subject: manual/8944 --- Completion/Core/_setup | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Completion/Core/_setup') 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 -- cgit 1.4.1