Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: completion problems.



Tanaka Akira wrote:

> I found two problems in completion with zsh-3.1.5-pws-16.
> 
> (1) zsh does not complete second candidate.
> ...
> Push TAB on after "ls ", then files in current directory is listed.
> ...
> Push TAB again, then "ChangeLog" is completed.
> ...
> Push TAB again and agen, nothing are changed.

Fixed by the patch below. Ahem. Sorry.

This was caused by a wrong test -- the one I moved to get _oldlist to
work. While playing with that, I also discovered another bug where the 
completion code thought it still were in menucompletion but didn't
even have a valid list anymore.

Also, while trying to test it with _oldlist, I found out that it
needed a little change (I have complete-word bound to TAB).

> Push TAB, then file list and "c" is cleared and "onfig" is completed.
> 
> rascal% ls  onfig
> 
> Push Ctrl-L, then screen is cleared and following line is appeared on
> top of screen.

This is a display-bug I can reproduce, but... Geoff?

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Tue Apr 27 15:38:11 1999
+++ Src/Zle/zle_tricky.c	Tue Apr 27 17:57:49 1999
@@ -760,8 +760,8 @@
 
     /* If we are doing a menu-completion... */
 
-    if (menucmp && lst != COMP_LIST_EXPAND && compwidget &&
-	compwidget == lastcompwidget) {
+    if (menucmp && lst != COMP_LIST_EXPAND && 
+	(!compwidget || compwidget == lastcompwidget)) {
 	do_menucmp(lst);
 	return;
     }
@@ -4598,6 +4598,7 @@
 	insmnum = insgnum = 1;
 	insgroup = oldlist = oldins = 0;
 	begcmgroup("default", 0);
+	menucmp = 0;
 
 	ccused = newlinklist();
 	ccstack = newlinklist();
diff -u oc/Core/_oldlist Completion/Core/_oldlist
--- oc/Core/_oldlist	Tue Apr 27 18:06:54 1999
+++ Completion/Core/_oldlist	Tue Apr 27 18:06:59 1999
@@ -15,7 +15,7 @@
 # If this is a completion widget, and we have a completion inserted already,
 # and the compconfig key oldlist_menu is not never, then we cycle through the
 # existing list (even if it was generated by another widget).
-if [[ -n $compstate[old_insert] && $WIDGET = *complete(|-prefix) &&
+if [[ -n $compstate[old_insert] && $WIDGET = *complete(|-prefix|-word) &&
   $compconfig[oldlist_menu] != never ]]; then
   compstate[old_list]=keep
   if [[ $WIDGET = *reverse* ]]; then

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author