1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-17 10:20:55 +01:00

20364: use $WIDGETSTYLE in _oldlist

This commit is contained in:
Peter Stephenson 2004-09-16 14:46:50 +00:00
parent 1268f477b0
commit 53383c33b8
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2004-09-16 Peter Stephenson <pws@csr.com>
* 20364: Functions/Completer/_oldlist: use $WIDGETSTYLE.
2004-09-13 Peter Stephenson <pws@csr.com>
* 20363: Src/init.c, Src/Zle/zle_main.c: exiting after 10 EOFs

View file

@ -15,7 +15,7 @@ zstyle -s ":completion:${curcontext}:" old-list list
if [[ -n $compstate[old_list] && $list != never &&
$LASTWIDGET != _complete_help && $WIDGET != _complete_help ]]; then
if [[ $WIDGET = *list* && ( $list = always || $list != shown ) ]]; then
if [[ $WIDGETSTYLE = *list* && ( $list = always || $list != shown ) ]]; then
compstate[old_list]=keep
return 0
elif [[ $list = *${_lastcomp[completer]}* ]]; then
@ -39,11 +39,11 @@ if [[ -z $compstate[old_insert] && -n $compstate[old_list] &&
$LASTWIDGET != _complete_help && $WIDGET != _complete_help ]]; then
compstate[old_list]=keep
return 0
elif [[ $WIDGET = *complete(|-prefix|-word) ]] &&
elif [[ $WIDGETSTYLE = *complete(|-prefix|-word) ]] &&
zstyle -T ":completion:${curcontext}:" old-menu; then
if [[ -n $compstate[old_insert] ]]; then
compstate[old_list]=keep
if [[ $WIDGET = *reverse* ]]; then
if [[ $WIDGETSTYLE = *reverse* ]]; then
compstate[insert]=$(( compstate[old_insert] - 1 ))
else
compstate[insert]=$(( compstate[old_insert] + 1 ))