From 3f1c1f5fe73d9fe48af8ffc2f0dbf2107d65cf52 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 2 Feb 2018 14:34:55 +1100 Subject: Implement SC_DOCUMENTOPTION_STYLES_NONE. --- 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 c2303c609..f9bc4259e 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -119,7 +119,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.
@@ -5743,9 +5743,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 @@ -5788,9 +5817,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 2aa2ff5b9..9e01bfcec 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -539,6 +539,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