mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
keep _oldlist from using the dummy match inserted for warnings (10691)
This commit is contained in:
parent
5ac242f449
commit
5de84477ac
3 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
|||
2000-04-12 Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
|
||||
|
||||
* 10691: Completion/Core/_main_complete, Completion/Core/_oldlist:
|
||||
keep _oldlist from using the dummy match inserted for warnings
|
||||
|
||||
* 10690: Doc/Zsh/compwid.yo, Src/Zle/compcore.c, Src/Zle/compctl.c,
|
||||
Src/Zle/compresult.c: comment out the code to allow
|
||||
$compstate[insert] to select the group
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
setopt localoptions nullglob rcexpandparam extendedglob
|
||||
unsetopt markdirs globsubst shwordsplit nounset ksharrays
|
||||
|
||||
local func funcs ret=1 tmp _compskip format \
|
||||
local func funcs ret=1 tmp _compskip format nm \
|
||||
_completers _completer _completer_num curtag \
|
||||
_matchers _matcher _matcher_num _comp_tags \
|
||||
context state line opt_args val_args curcontext="$curcontext" \
|
||||
|
@ -105,8 +105,9 @@ for tmp in "$_completers[@]"; do
|
|||
done
|
||||
|
||||
curcontext="${curcontext/:[^:]#:/::}"
|
||||
nm=$compstate[nmatches]
|
||||
|
||||
if [[ $compstate[old_list] = keep || $compstate[nmatches] -gt 1 ]]; then
|
||||
if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
|
||||
[[ _last_nmatches -ge 0 && _last_nmatches -ne $compstate[nmatches] ]] &&
|
||||
_menu_style=( "$_last_menu_style[@]" "$_menu_style[@]" )
|
||||
|
||||
|
@ -160,7 +161,7 @@ if [[ $compstate[old_list] = keep || $compstate[nmatches] -gt 1 ]]; then
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
elif [[ $compstate[nmatches] -eq 0 &&
|
||||
elif [[ nm -eq 0 &&
|
||||
$#_lastdescr -ne 0 && $compstate[old_list] != keep ]] &&
|
||||
zstyle -s ":completion:${curcontext}:warnings" format format; then
|
||||
|
||||
|
@ -195,6 +196,7 @@ for func in "$funcs[@]"; do
|
|||
done
|
||||
|
||||
_lastcomp=( "${(@kv)compstate}" )
|
||||
_lastcomp[nmatches]=$nm
|
||||
_lastcomp[completer]="$_completer"
|
||||
_lastcomp[prefix]="$PREFIX"
|
||||
_lastcomp[suffix]="$SUFFIX"
|
||||
|
|
|
@ -35,6 +35,7 @@ fi
|
|||
# existing list (even if it was generated by another widget).
|
||||
|
||||
if [[ -z $compstate[old_insert] && -n $compstate[old_list] &&
|
||||
( $_lastcomp[nmatches] -ne 0 || $WIDGET != $LASTWIDGET ) &&
|
||||
$LASTWIDGET != _complete_help && $WIDGET != _complete_help ]]; then
|
||||
compstate[old_list]=keep
|
||||
return 0
|
||||
|
|
Loading…
Reference in a new issue