aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorZufu Liu <unknown>2021-07-15 17:29:24 +1000
committerZufu Liu <unknown>2021-07-15 17:29:24 +1000
commit39be73514c317e7d672e0a09862571e64f8979da (patch)
treebbfb503821368eaa608174af4532f50026e3f723 /include
parentf4878568f55a9c3b6eef8cc8fad9b1aa7e8ab4ce (diff)
downloadscintilla-mirror-39be73514c317e7d672e0a09862571e64f8979da.tar.gz
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.
Diffstat (limited to 'include')
-rw-r--r--include/Scintilla.h1
-rw-r--r--include/Scintilla.iface3
-rw-r--r--include/ScintillaCall.h1
-rw-r--r--include/ScintillaMessages.h1
4 files changed, 6 insertions, 0 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h
index a92b51684..088abc0d8 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -467,6 +467,7 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP
#define SCI_GETFIRSTVISIBLELINE 2152
#define SCI_GETLINE 2153
#define SCI_GETLINECOUNT 2154
+#define SCI_ALLOCATELINES 2089
#define SCI_SETMARGINLEFT 2155
#define SCI_GETMARGINLEFT 2156
#define SCI_SETMARGINRIGHT 2157
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index 131ca2814..b59cda663 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -1196,6 +1196,9 @@ fun position GetLine=2153(line line, stringresult text)
# Returns the number of lines in the document. There is always at least one.
get line GetLineCount=2154(,)
+# Enlarge the number of lines allocated.
+set void AllocateLines=2089(line lines,)
+
# Sets the size in pixels of the left margin.
set void SetMarginLeft=2155(, int pixelWidth)
diff --git a/include/ScintillaCall.h b/include/ScintillaCall.h
index 778a195d0..e0cfdd052 100644
--- a/include/ScintillaCall.h
+++ b/include/ScintillaCall.h
@@ -320,6 +320,7 @@ public:
Position GetLine(Line line, char *text);
std::string GetLine(Line line);
Line LineCount();
+ void AllocateLines(Line lines);
void SetMarginLeft(int pixelWidth);
int MarginLeft();
void SetMarginRight(int pixelWidth);
diff --git a/include/ScintillaMessages.h b/include/ScintillaMessages.h
index 2d19db1ae..a0c641a39 100644
--- a/include/ScintillaMessages.h
+++ b/include/ScintillaMessages.h
@@ -255,6 +255,7 @@ enum class Message {
GetFirstVisibleLine = 2152,
GetLine = 2153,
GetLineCount = 2154,
+ AllocateLines = 2089,
SetMarginLeft = 2155,
GetMarginLeft = 2156,
SetMarginRight = 2157,