Hackers,
The attached attempts to make comprehension of the code in "TS_phrase_execute" a bit easier. I posted similar on the "typo patch" thread of July 2nd/5th but my comments there reflected my mis-understanding of the distance operator being exact as opposed to the expected less-than-or-equal.
I had to make one assumption for the attached - that "curitem->qoperator.distance" is always >= 0. In the presence of that assumption the need for the OR goes away.
I don't follow why LposStart is needed so I removed it...
Not compiled or in any way tested...but its not major surgery either - mostly code comments to make following the logic easier.
David J.