From 39be73514c317e7d672e0a09862571e64f8979da Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Thu, 15 Jul 2021 17:29:24 +1000 Subject: Feature [feature-requests:#1370] Implement SCI_ALLOCATELINES to allocate indices to hold some number of lines. This is an optimization that can decrease reallocation overhead. --- doc/ScintillaDoc.html | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 50409c0af..03fe95ea9 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -531,6 +531,7 @@ SCI_GETREADONLY → bool
SCI_GETTEXTRANGE(<unused>, Sci_TextRange *tr) → position
SCI_ALLOCATE(position bytes)
+ SCI_ALLOCATELINES(line lines)
SCI_ADDTEXT(position length, const char *text)
SCI_ADDSTYLEDTEXT(position length, cell *c)
SCI_APPENDTEXT(position length, const char *text)
@@ -645,6 +646,12 @@ Allocate a document buffer large enough to store a given number of bytes. The document will not be made smaller than its current contents.

+

SCI_ALLOCATELINES(line lines)
+ Allocate line indices to match the lines argument. + This is an optimization that can prevent multiple reallocations of the indices as text is inserted + if the application can estimate the number of lines in the document. + The number of lines will not be reduced by this call.

+

SCI_ADDTEXT(position length, const char *text)
This inserts the first length characters from the string text -- cgit v1.2.3