Hi Neil,
This prompts me to request an addition or variation.
For symbol parsing of the buffer it is currently necessary to read the
entire buffer at once. An interface (such as this one) that uses
position to read successive slices of the buffer cannot cope with
changes to the buffer between calls, as the position of the next
character to read will change if there is an insert or delete prior to
it. So using positions can lead to characters being missed or double
parsed.
Instead is it possible to have a stream like interface that provides
access to successive slices through the buffer. This means Scintilla
retaining some state, eg a pointer to the next byte and adjusting it
if the byte moves, due to gap movement (if it points to part that is
moved), deletion or a new buffer.
eg
SCI_OPENSTREAM() returns small int identifying the stream
SCI_GETSTREAMPOINTER(stream, rangeLength) which returns a direct range
pointer (as above) to the current stream position and advances the
stream position
SCI_CLOSESTREAM(stream) makes the int available for re-use
Only a limited number of streams need to be accommodated, minimum one
per buffer, so that the overhead of checking on gap movement is kept
small.
In this way the parsing does not need to block the UI as it can allow
changes between parsing successive slices.
Cheers
Lex
>
> Neil
>
> --
> You received this message because you are subscribed to the Google Groups
> "scintilla-interest" group.
> To post to this group, send email to
scintilla...@googlegroups.com.
> To unsubscribe from this group, send email to
>
scintilla-inter...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/scintilla-interest?hl=en.