From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17228 invoked from network); 27 Apr 1999 16:12:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Apr 1999 16:12:15 -0000 Received: (qmail 606 invoked by alias); 27 Apr 1999 16:12:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6124 Received: (qmail 599 invoked from network); 27 Apr 1999 16:12:03 -0000 Date: Tue, 27 Apr 1999 18:12:02 +0200 (MET DST) Message-Id: <199904271612.SAA16038@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 27 Apr 1999 23:26:50 +0900 Subject: 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@informatik.hu-berlin.de