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

Re: bug with completion in quotes



On Wed, 22 Oct 2014 16:05:01 +0200
Oliver Kiddle <okiddle@xxxxxxxxxxx> 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



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