From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4626 invoked from network); 8 Jul 1999 14:20:22 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Jul 1999 14:20:22 -0000 Received: (qmail 9114 invoked by alias); 8 Jul 1999 14:20:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7043 Received: (qmail 9107 invoked from network); 8 Jul 1999 14:20:07 -0000 Date: Thu, 8 Jul 1999 16:20:05 +0200 (MET DST) Message-Id: <199907081420.QAA12601@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Thu, 8 Jul 1999 17:20:32 +0400 Subject: RE: PATCH: Re: General comments on completion Andrej Borsenkow wrote: > bor@itsrm2:~/test/match%> ls /h/b/t/m/a?a/<12->TAB > bor@itsrm2:~/test/match%> ls /home/bor/test/match/a/\<12-\> > axa/ aya/ ^ cursor here; after TAB > bor@itsrm2:~/test/match%> l /home/bor/test/match/axa/\<12-\>CURSOR HERE > axa/ aya/ ^ This makes _oldlist try to retain the cursor-positioning in cases like these (when re-using a list from a certain completer). Bye Sven diff -u oc/Core/_oldlist Completion/Core/_oldlist --- oc/Core/_oldlist Thu Jul 8 11:11:49 1999 +++ Completion/Core/_oldlist Thu Jul 8 16:18:04 1999 @@ -6,13 +6,17 @@ # (even if it was generated by another widget). # Do this also if there is an old list and it was generated by the # completer named by the oldlist_list key. -if [[ -n $compstate[old_list] && $compconfig[oldlist_list] != never && - ( ( $WIDGET = *list* && - ( $compconfig[oldlist_list] = always || - $compstate[old_list] != shown ) ) || - $compconfig[oldlist_list] = *${_lastcomp[completer]}* ) ]]; then - compstate[old_list]=keep - return 0 +if [[ -n $compstate[old_list] && $compconfig[oldlist_list] != never ]]; then + if [[ $WIDGET = *list* && + ( $compconfig[oldlist_list] = always || + $compstate[old_list] != shown ) ]]; then + compstate[old_list]=keep + return 0 + elif [[ $compconfig[oldlist_list] = *${_lastcomp[completer]}* ]]; then + [[ "$_lastcomp[insert]" = unambig* ]] && compstate[to_end]=single + compstate[old_list]=keep + return 0 + fi fi # If this is a completion widget, and we have a completion inserted already, -- Sven Wischnowsky wischnow@informatik.hu-berlin.de