Subject: Re: Slow highlighting (Re: "drop-in replacement" and transpose-words-match)
From: Bart Schaefer <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Fri, 12 Feb 2016 02:05:39 -0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Feb 11,  5:11pm, Sebastian Gniazdowski wrote:
} Subject: Re: Slow highlighting (Re: "drop-in replacement" and transpose-wo
}
} -      integer offset=${${buf[start_pos+1,-1]}[(i)$needle]}
} +      # Len-start_pos drops one character, but it should do it, as start_pos
} +      # starts from next, not from "start_pos", character
} +      integer offset=${${buf: start_pos: len-start_pos}[(i)$needle]}

Hrm.  This goes back to the discussion from several months ago about
$string[left,right] using the same generic code as $array[left,right],
if I'm recalling that thread correctly.  The ${string:left:len} form
on the other hand uses a scalar-specific approach.