Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _oldlist and _complete_help oddities
- X-seq: zsh-workers 10648
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: _oldlist and _complete_help oddities
- Date: Tue, 11 Apr 2000 12:40:51 +0200 (MET DST)
- In-reply-to: "Andrej Borsenkow"'s message of Tue, 11 Apr 2000 14:33:19 +0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> bor@itsrm2% ls <TAB>
> bor@itsrm2% ls
> ...
> bor@itsrm2% ls ^Xh
> Completing file
> CVS/            ChangeLog       ChangeLog.3.0   Completion/     Config/
> ...
> 
> List is not redrawn.
Oops. _oldlist should not only ignore the list from _complete_help, it 
should also avoid to re-use an old list if _complete_help is called.
And now the tests there really make me think that there has to be a
cleaner way...
Bye
 Sven
Index: Completion/Core/_oldlist
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_oldlist,v
retrieving revision 1.3
diff -u -r1.3 _oldlist
--- Completion/Core/_oldlist	2000/04/11 09:40:13	1.3
+++ Completion/Core/_oldlist	2000/04/11 10:39:22
@@ -14,7 +14,7 @@
 # completer named by the oldlist_list key.
 
 if [[ -n $compstate[old_list] && $list != never &&
-      $LASTWIDGET != _complete_help ]]; then
+      $LASTWIDGET != _complete_help && $WIDGET != _complete_help ]]; then
   if [[ $WIDGET = *list* && ( $list = always || $list != shown ) ]]; then
     compstate[old_list]=keep
     return 0
@@ -35,7 +35,7 @@
 # existing list (even if it was generated by another widget).
 
 if [[ -z $compstate[old_insert] && -n $compstate[old_list] &&
-      $LASTWIDGET != _complete_help ]]; then
+      $LASTWIDGET != _complete_help && $WIDGET != _complete_help ]]; then
   compstate[old_list]=keep
   return 0
 elif [[ $WIDGET = *complete(|-prefix|-word) ]] &&
--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author