From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20466 invoked by alias); 22 Oct 2014 14:28:19 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33507 Received: (qmail 15005 invoked from network); 22 Oct 2014 14:28:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f4-b7f6c6d00000120b-ff-5447bef33f96 Date: Wed, 22 Oct 2014 15:28:02 +0100 From: Peter Stephenson To: Zsh workers Subject: Re: bug with completion in quotes Message-id: <20141022152802.5dc5bcb3@pwslap01u.europe.root.pri> In-reply-to: <26407.1413986701@thecus.kiddle.eu> References: <13524.1413067029@thecus.kiddle.eu> <20141020182232.1e0e828b@pwslap01u.europe.root.pri> <26407.1413986701@thecus.kiddle.eu> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplluLIzCtJLcpLzFFi42I5/e/4Vd3P+9xDDPra9C0ONj9kcmD0WHXw A1MAYxSXTUpqTmZZapG+XQJXxttHm5kKlnNW/JgU1cDYw97FyMkhIWAisfPEBEYIW0ziwr31 bF2MXBxCAksZJR42T2GHcJYzSXRPnAvWwSKgKnHtw15mEJtNwFBi6qbZYN0iQPE5J06xgtjC AloSz+9PYgGxeQXsJZa83A4W5xQwkPh1qJEJYmg3o8TEzlVsIAl+AX2Jq38/MUGcYS8x88oZ RohmQYkfk++BDWIGGrp5WxMrhC0vsXnNW+YJjAKzkJTNQlI2C0nZAkbmVYyiqaXJBcVJ6bmG esWJucWleel6yfm5mxghQfhlB+PiY1aHGAU4GJV4eGdwuIcIsSaWFVfmHmKU4GBWEuEN2QMU 4k1JrKxKLcqPLyrNSS0+xMjEwSnVwChyUS9ac9t5xaqdjiIRMTK3eV01+wvPy9SxvFcRSxJ5 wFucK8Gdt9jH8c4WQ/25b74LH61fEBF0NMRkj2B+1JSfVtaTujh1X3RceKrZuu7nlq9aL+Mv a1YeOFe8vXfJWxHLfp5fPkK1Cb/Tzz+T6ixZ0BXCaCifuGHvssexT8xMF5bdZ5rgq8RSnJFo qMVcVJwIAIdBRfIgAgAA On Wed, 22 Oct 2014 16:05:01 +0200 Oliver Kiddle wrote: > Peter Stephenson wrote: > > > > Note that when the cursor is inside $'...' we deliberately don't try to > > expand the $'...'. That's not a change. Possibly we could do so, but > > we'd need to be careful about where the cursor ended up. > > By the way, I've been using this patch and it seems to work fine. > > I don't think we'd want to expand the $'...': I think it's fine as it > is. Good --- I've been a little tied up (guess which revision control system we've suddenly decided to move to?) but I'm worried that - if ((zlemetacs = ocs) > (i -= skipchars)) + if ((zlemetacs = ocs) > i--) should actually be - if ((zlemetacs = ocs) > (i -= skipchars)) + if ((zlemetacs = ocs) > --i) In other words, I'm sure that only decrementing once is correct --- we're deleting characters ahead of the point we're looking at, so the decrement is simply to cancel out the effect of the ++i in the loop iterator --- but the --i is more consistent with what was there before. I'll try and puzzle out the exact meaning of the indices before I commit this. pws