From 6fb4db4d6e160550a0889e209174b86e94bfe672 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 2 Feb 2018 14:34:55 +1100 Subject: Backport: Implement SC_DOCUMENTOPTION_STYLES_NONE. Backport of changeset 6448:431b814a54a6. --- doc/ScintillaDoc.html | 42 +++++++++++++++++++++++++++++++++++------- doc/ScintillaHistory.html | 5 +++++ 2 files changed, 40 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index a1d46b1fa..08b91778c 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -116,7 +116,7 @@

Scintilla Documentation

-

Last edited 31 January 2018 NH

+

Last edited 1 February 2018 NH

There is an overview of the internal design of Scintilla.
@@ -5720,9 +5720,38 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ to allocate once rather than rely on the buffer growing as data is added. If SCI_CREATEDOCUMENT fails then 0 is returned.

-

The documentOption argument may be used in future versions - to choose between different document capabilities which affect memory allocation and performance. - The only valid value for now is SC_DOCUMENTOPTION_DEFAULT (0).

+

The documentOption argument + chooses between different document capabilities which affect memory allocation and performance with + SC_DOCUMENTOPTION_DEFAULT (0) choosing standard options. + SC_DOCUMENTOPTION_STYLES_NONE (1) stops allocation of memory to style characters + which saves significant memory, often 40% with the whole document treated as being style 0. + Lexers may still produce visual styling by using indicators.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolValueEffect
SC_DOCUMENTOPTION_DEFAULT0Standard behaviour
SC_DOCUMENTOPTION_STYLES_NONE1Stop allocation of memory for styles and treat all text as style 0.

SCI_ADDREFDOCUMENT(<unused>, document *doc)
This increases the reference count of a document by 1. If you want to replace the current @@ -5765,9 +5794,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ to allocate once rather than rely on the buffer growing as data is added. If SCI_CREATELOADER fails then 0 is returned.

-

The documentOption argument may be used in future versions - to choose between different document capabilities which affect memory allocation and performance. - The only valid value for now is SC_DOCUMENTOPTION_DEFAULT (0).

+

The documentOption argument + is described in the SCI_CREATEDOCUMENT section.

ILoader

diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index c7d86b0ff..14a2820e3 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -569,6 +569,11 @@
  • SCI_CREATEDOCUMENT adds a bytes argument to allocate memory for an initial size. + SCI_CREATELOADER and SCI_CREATEDOCUMENT add a documentOption argument to + allow choosing different document capabilities. +
  • +
  • + Add SC_DOCUMENTOPTION_STYLES_NONE option to stop allocating memory for styles.
  • Add SCI_GETMOVEEXTENDSSELECTION to allow applications to add more -- cgit v1.2.3