Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug with completion in quotes
On Wed, 22 Oct 2014 15:28:02 +0100
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> 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.
I can't find a case where this seems to make a difference in practice.
If there's an off-by-one error remaining it's a very subtle one.
Given that, I'll commit this with the second change since it looks more
like what's there but with the definite bug removed.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author