[QScintilla] Using python strings with SendScintilla
Baz Walter
bazwal at ftml.net
Sat Nov 8 17:57:46 GMT 2008
Phil Thompson wrote:
> There's no problem with adding something like...
>
> const char *QsciScintilla::rawText() const;
> void QsciScintilla::setRawText(const char *text);
that sounds good, but i'd like to avoid retrieving the whole text for
large documents if i only need a (variable length) slice. so for
rawText(), something equivalent to SCI_GETTEXTRANGE would be nice, with
startpos and endpos arguments that default to 0, -1 (i.e. textlength -
1). probably a method like this shouldn't use the row, column style as
it is dealing with raw text.
for something equivalent to setRawText, i use SCI_REPLACETARGET and
friends because it doesn't require setting the selection and it doesn't
cause the scrolling, display updates etc that you get with something
like SCI_REPLACESEL. this is really essential when implementing methods
that loop over the document making replacements, as the performance can
be really horrible otherwise (depends on the size of the document, of
course).
thanks for taking the time to consider this
More information about the QScintilla
mailing list