From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id MAA24114 for ; Sat, 15 Jul 1995 12:59:27 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA07394 (5.65c/Gatech-10.0-IDA for ); Fri, 14 Jul 1995 23:00:28 -0400 Received: by math (5.x/SMI-SVR4) id AA14775; Fri, 14 Jul 1995 22:57:12 -0400 Resent-Date: Sat, 15 Jul 1995 03:58:11 +0100 (BST) Old-Return-Path: From: Zefram Message-Id: <711.199507150258@stone.dcs.warwick.ac.uk> Subject: Re: Completion quirks To: zsh-workers@math.gatech.edu (Z Shell workers mailing list) Date: Sat, 15 Jul 1995 03:58:11 +0100 (BST) In-Reply-To: from "zefram" at Jul 15, 95 03:19:33 am X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]5980.61 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"xgkMO2.0.nc3.7wo1m"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/207 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----BEGIN PGP SIGNED MESSAGE----- I wrote: >With hzoli10 I got this behaviour, and also with my own patched beta10 >(though starting with the correct match). This problem is almost >certainly a result of my completion list patches (which I can't test >with every option, though I did give it a bit of a work out). Plain >beta10 for me misbehaved on the second completion, much in the way you >describe, so I think it is safe to say that REC_EXACT is, for the >moment, broken. I'll see what I can do... The patch below fixes both of the observed problems with REC_EXACT (one of which was present in beta10 and probably earlier betas too). The problem of the completion prefix being inserted a second time was due to a missing invalidatelist(), just like the previous case of this problem (that Zoltan pointed out). A quick grep for do_single indicates that all calls to do_single() that should be followed by an invalidatelist() now are. The older problem is due to listambig being set, and remaining set, when REC_EXACT is invoked, letting AUTO_MENU start menu completion on the next tab when it shouldn't. This is fixed by moving the line that sets listambig. -zefram *** Src/zle_tricky.c.old Sat Jul 15 03:40:02 1995 --- Src/zle_tricky.c Sat Jul 15 03:47:19 1995 *************** *** 3187,3193 **** { int p = (usemenu || ispattern), atend = (cs == we); - lastambig = 1; menucmp = 0; /* If we have to insert the first match, call do_single(). */ --- 3187,3192 ---- *************** *** 3194,3200 **** --- 3193,3201 ---- if (shortest && shortl == 0 && isset(RECEXACT) && (usemenu == 0 || unset(AUTOMENU))) { do_single(shortest); + invalidatelist(); } else { + lastambig = 1; if (p) /* Otherwise we have to do menu-completion... */ do_ambig_menu(); -----BEGIN PGP SIGNATURE----- Version: 2.6.i iQBVAgUBMAcusmWJ8JfKi+e9AQGUpgH/d7kksV5LZ9LB3hCleFHVSPeDxzYQ8v08 Jx+xAYQs4r5QlhQeqxWL26bJyaeofm6+8PeS+M0/JkuUw8HM5ra/Ww== =njj8 -----END PGP SIGNATURE-----