Another slow restart on folding: First question: Searches done in a specially constructed string?

Tony Balinski ajbj at free.fr
Tue Aug 5 20:22:52 CEST 2008


Quoting Randy Kramer <rhkramer at gmail.com>:


> My understanding is that for the various nedit search operations, nedit
> doesn't perform the search in the textBuf (iir the name correctly), but
> instead it creates a string consisting of all the text in the document and
> then searches in that.
>
> Can any one confirm that?

That's what it did do (5.5). Now it provides a pointer to the text in
the document's buffer. Since the search routines expect a contiguous
string and the buffer provides a gap to allow insertion of new text
at the insert point, the gap is shuffled to one of the two extremes
(whichever is closest to the gap before the shuffle) before returning
a pointer to the document's first character in the buffer.

Tony


More information about the Develop mailing list