From 5da483e702cf645f6a25918c6ceeb36202a54ce6 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 7 Dec 2014 13:40:56 +0100 Subject: [PATCH] Update Scintilla to version 3.5.2 Signed-off-by: Sven Strickroth --- ext/scintilla/doc/ScintillaDoc.html | 262 +++++++++------- ext/scintilla/doc/ScintillaDownload.html | 10 +- ext/scintilla/doc/ScintillaHistory.html | 76 +++++ ext/scintilla/doc/index.html | 12 +- ext/scintilla/include/Scintilla.h | 10 +- ext/scintilla/include/Scintilla.iface | 9 +- ext/scintilla/lexers/LexCoffeeScript.cxx | 178 +---------- ext/scintilla/lexers/LexVHDL.cxx | 3 +- ext/scintilla/src/CellBuffer.cxx | 2 +- ext/scintilla/src/Decoration.cxx | 4 +- ext/scintilla/src/Document.cxx | 504 ++++++++++++++++++++++++++++--- ext/scintilla/src/Document.h | 19 +- ext/scintilla/src/EditModel.cxx | 1 + ext/scintilla/src/EditView.cxx | 59 ++-- ext/scintilla/src/EditView.h | 11 +- ext/scintilla/src/Editor.cxx | 106 ++++--- ext/scintilla/src/Editor.h | 2 +- ext/scintilla/src/LineMarker.cxx | 5 + ext/scintilla/src/LineMarker.h | 10 + ext/scintilla/src/MarginView.cxx | 11 +- ext/scintilla/src/MarginView.h | 9 + ext/scintilla/src/PositionCache.cxx | 1 + ext/scintilla/src/RESearch.h | 2 +- ext/scintilla/src/ScintillaBase.cxx | 1 + ext/scintilla/src/UniConversion.cxx | 46 +++ ext/scintilla/src/UniConversion.h | 4 + ext/scintilla/version.txt | 2 +- ext/scintilla/win32/PlatWin.cxx | 27 +- ext/scintilla/win32/ScintRes.rc | 4 +- ext/scintilla/win32/ScintillaWin.cxx | 103 ++++--- ext/scintilla/win32/makefile | 18 +- ext/scintilla/win32/scintilla.mak | 4 + 32 files changed, 1044 insertions(+), 471 deletions(-) diff --git a/ext/scintilla/doc/ScintillaDoc.html b/ext/scintilla/doc/ScintillaDoc.html index a808c9b5f..c2779a8c2 100644 --- a/ext/scintilla/doc/ScintillaDoc.html +++ b/ext/scintilla/doc/ScintillaDoc.html @@ -82,7 +82,7 @@

Scintilla Documentation

-

Last edited 25 September 2014 NH

+

Last edited 24 November 2014 NH

There is an overview of the internal design of Scintilla.
@@ -606,23 +606,97 @@ struct Sci_TextRange {

Searching

- There are methods to search for text and for regular expressions. The regular expression support - is limited and should only be used for simple cases and initial development. A different regular expression + There are methods to search for text and for regular expressions. + Most applications should use + SCI_SEARCHINTARGET + as the basis for their search implementations. + Other calls augment this or were implemented before SCI_SEARCHINTARGET. +

+

+ The base regular expression support + is limited and should only be used for simple cases and initial development. + When using a C++11 compliant compiler and runtime, it may be possible to use the + runtime's implementation of <regex> by compiling Scintilla with CXX11_REGEX defined. + A different regular expression library can be integrated into Scintilla or can be called from the container using direct access to the buffer contents through SCI_GETCHARACTERPOINTER.

- SCI_FINDTEXT(int flags, Sci_TextToFind - *ttf)
- SCI_SEARCHANCHOR
- SCI_SEARCHNEXT(int searchFlags, const char + +

Search and replace using the target

+ +

Searching can be performed within the target range with SCI_SEARCHINTARGET, + which uses a counted string to allow searching for null characters. It returns the + position of the start of the matching text range or -1 for failure, in which case the target is not moved. The flags used by + SCI_SEARCHINTARGET such as SCFIND_MATCHCASE, + SCFIND_WHOLEWORD, SCFIND_WORDSTART, and SCFIND_REGEXP + can be set with SCI_SETSEARCHFLAGS.

+
SCI_SETTARGETSTART(int pos)
+ SCI_GETTARGETSTART
+ SCI_SETTARGETEND(int pos)
+ SCI_GETTARGETEND
+ SCI_TARGETFROMSELECTION
+ SCI_SETSEARCHFLAGS(int searchFlags)
+ SCI_GETSEARCHFLAGS
+ SCI_SEARCHINTARGET(int length, const char *text)
- SCI_SEARCHPREV(int searchFlags, const char + SCI_REPLACETARGET(int length, const char + *text)
+ SCI_REPLACETARGETRE(int length, const char *text)
- Search and replace using the - target
+ SCI_GETTAG(int tagNumber, char *tagValue)
+

SCI_SETTARGETSTART(int pos)
+ SCI_GETTARGETSTART
+ SCI_SETTARGETEND(int pos)
+ SCI_GETTARGETEND
+ These functions set and return the start and end of the target. When searching + you can set start greater than end to find the last matching text in the + target rather than the first matching text. The target is also set by a successful + SCI_SEARCHINTARGET.

+ +

SCI_TARGETFROMSELECTION
+ Set the target start and end to the start and end positions of the selection.

+ +

SCI_SETSEARCHFLAGS(int searchFlags)
+ SCI_GETSEARCHFLAGS
+ These get and set the searchFlags used by + SCI_SEARCHINTARGET. There are several option flags including a simple regular + expression search.

+ +

SCI_SEARCHINTARGET(int length, const char *text)
+ This searches for the first occurrence of a text string in the target defined by + SCI_SETTARGETSTART and SCI_SETTARGETEND. The text string is not zero + terminated; the size is set by length. The search is modified by the search flags + set by SCI_SETSEARCHFLAGS. If the search succeeds, the target is set to the found + text and the return value is the position of the start of the matching text. If the search + fails, the result is -1.

+ +

SCI_REPLACETARGET(int length, const char *text)
+ If length is -1, text is a zero terminated string, otherwise + length sets the number of character to replace the target with. + After replacement, the target range refers to the replacement text. + The return value + is the length of the replacement string.
+ Note that the recommended way to delete text in the document is to set the target to the text to be removed, + and to perform a replace target with an empty string.

+ +

SCI_REPLACETARGETRE(int length, const char *text)
+ This replaces the target using regular expressions. If length is -1, + text is a zero terminated string, otherwise length is the number of + characters to use. The replacement string is formed from the text string with any sequences of + \1 through \9 replaced by tagged matches from the most recent regular + expression search. \0 is replaced with all the matched text from the most recent search. + After replacement, the target range refers to the replacement text. + The return value is the length of the replacement string.

+ +

SCI_GETTAG(int tagNumber, char *tagValue)
+ Discover what text was matched by tagged expressions in a regular expression search. + This is useful if the application wants to interpret the replacement string itself.

+ +

See also: SCI_FINDTEXT

+

searchFlags
Several of the search routines use flag options, which include a simple regular expression search. Combine the flag options by adding them:

@@ -658,13 +732,20 @@ struct Sci_TextRange { Treat regular expression in a more POSIX compatible manner by interpreting bare ( and ) for tagged sections rather than \( and \). + + SCFIND_CXX11REGEX + + When compiled with CXX11_REGEX this flag + may be set to use <regex> instead of Scintilla's basic regular expressions. + If the regular expression is invalid then -1 is returned and status is set to + SC_STATUS_WARN_REGEX. + The ECMAScript flag is set on the regex object and UTF-8 documents will exhibit Unicode-compliant + behaviour. For MSVC, where wchar_t is 16-bits, the reular expression ".." will match a single + astral-plane character. There may be other differences between compilers. + -

You can - search backwards to find the previous occurrence of a search string by setting the end of the - search range before the start.

-

In a regular expression, special characters interpreted are:

@@ -760,12 +841,25 @@ struct Sci_TextRange {

Regular expressions will only match ranges within a single line, never matching over multiple lines.

+ SCI_FINDTEXT(int flags, Sci_TextToFind + *ttf)
+ SCI_SEARCHANCHOR
+ SCI_SEARCHNEXT(int searchFlags, const char + *text)
+ SCI_SEARCHPREV(int searchFlags, const char + *text)
+
+

SCI_FINDTEXT(int searchFlags, Sci_TextToFind *ttf)
This message searches for text in the document. It does not use or move the current selection. The searchFlags argument controls the search type, which includes regular expression searches.

+

You can + search backwards to find the previous occurrence of a search string by setting the end of the + search range before the start.

+

The Sci_TextToFind structure is defined in Scintilla.h; set chrg.cpMin and chrg.cpMax with the range of positions in the document to search. You can search backwards by @@ -818,89 +912,6 @@ struct Sci_TextToFind {

See also: SCI_SEARCHINTARGET, SCI_FINDTEXT

-

Search and replace using the target

- -

Using SCI_REPLACESEL, - modifications cause scrolling and other visible changes, which may take some time and cause - unwanted display updates. If performing many changes, such as a replace all command, the target - can be used instead. First, set the target, ie. the range to be replaced. Then call - SCI_REPLACETARGET or SCI_REPLACETARGETRE.

- -

Searching can be performed within the target range with SCI_SEARCHINTARGET, - which uses a counted string to allow searching for null characters. It returns the - position of the start of the matching text range or -1 for failure, in which case the target is not moved. The flags used by - SCI_SEARCHINTARGET such as SCFIND_MATCHCASE, - SCFIND_WHOLEWORD, SCFIND_WORDSTART, and SCFIND_REGEXP - can be set with SCI_SETSEARCHFLAGS. SCI_SEARCHINTARGET may be simpler - for some clients to use than SCI_FINDTEXT, as that requires using a pointer to a - structure.

- SCI_SETTARGETSTART(int pos)
- SCI_GETTARGETSTART
- SCI_SETTARGETEND(int pos)
- SCI_GETTARGETEND
- SCI_TARGETFROMSELECTION
- SCI_SETSEARCHFLAGS(int searchFlags)
- SCI_GETSEARCHFLAGS
- SCI_SEARCHINTARGET(int length, const char - *text)
- SCI_REPLACETARGET(int length, const char - *text)
- SCI_REPLACETARGETRE(int length, const char - *text)
- SCI_GETTAG(int tagNumber, char *tagValue)
-
- -

SCI_SETTARGETSTART(int pos)
- SCI_GETTARGETSTART
- SCI_SETTARGETEND(int pos)
- SCI_GETTARGETEND
- These functions set and return the start and end of the target. When searching in non-regular - expression mode, you can set start greater than end to find the last matching text in the - target rather than the first matching text. The target is also set by a successful - SCI_SEARCHINTARGET.

- -

SCI_TARGETFROMSELECTION
- Set the target start and end to the start and end positions of the selection.

- -

SCI_SETSEARCHFLAGS(int searchFlags)
- SCI_GETSEARCHFLAGS
- These get and set the searchFlags used by - SCI_SEARCHINTARGET. There are several option flags including a simple regular - expression search.

- -

SCI_SEARCHINTARGET(int length, const char *text)
- This searches for the first occurrence of a text string in the target defined by - SCI_SETTARGETSTART and SCI_SETTARGETEND. The text string is not zero - terminated; the size is set by length. The search is modified by the search flags - set by SCI_SETSEARCHFLAGS. If the search succeeds, the target is set to the found - text and the return value is the position of the start of the matching text. If the search - fails, the result is -1.

- -

SCI_REPLACETARGET(int length, const char *text)
- If length is -1, text is a zero terminated string, otherwise - length sets the number of character to replace the target with. - After replacement, the target range refers to the replacement text. - The return value - is the length of the replacement string.
- Note that the recommended way to delete text in the document is to set the target to the text to be removed, - and to perform a replace target with an empty string.

- -

SCI_REPLACETARGETRE(int length, const char *text)
- This replaces the target using regular expressions. If length is -1, - text is a zero terminated string, otherwise length is the number of - characters to use. The replacement string is formed from the text string with any sequences of - \1 through \9 replaced by tagged matches from the most recent regular - expression search. \0 is replaced with all the matched text from the most recent search. - After replacement, the target range refers to the replacement text. - The return value is the length of the replacement string.

- -

SCI_GETTAG(int tagNumber, char *tagValue)
- Discover what text was matched by tagged expressions in a regular expression search. - This is useful if the application wants to interpret the replacement string itself.

- -

See also: SCI_FINDTEXT

-

Overtype

SCI_SETOVERTYPE(bool overType)
@@ -971,6 +982,8 @@ struct Sci_TextToFind { If an error occurs, Scintilla may set an internal error number that can be retrieved with SCI_GETSTATUS. To clear the error status call SCI_SETSTATUS(0). + Status values from 1 to 999 are errors and status SC_STATUS_WARN_START (1000) + and above are warnings. The currently defined statuses are:

@@ -988,12 +1001,18 @@ struct Sci_TextToFind { - + + + + + + +
Generic failure
SC_STATUS_BADALLOC 2 Memory is exhausted
SC_STATUS_WARN_REGEX1001Regular expression is invalid
@@ -1514,12 +1533,12 @@ struct Sci_TextToFind {

SCI_MOVESELECTEDLINESUP
Move the selected lines up one line, shifting the line above after the selection. - The selection will be automatically extended to the beginning of the selection's first line and the end of the seletion's last line. + The selection will be automatically extended to the beginning of the selection's first line and the end of the selection's last line. If nothing was selected, the line the cursor is currently at will be selected.

SCI_MOVESELECTEDLINESDOWN
Move the selected lines down one line, shifting the line below before the selection. - The selection will be automatically extended to the beginning of the selection's first line and the end of the seletion's last line. + The selection will be automatically extended to the beginning of the selection's first line and the end of the selection's last line. If nothing was selected, the line the cursor is currently at will be selected.

SCI_SETMOUSESELECTIONRECTANGULARSWITCH(bool @@ -3141,6 +3160,14 @@ struct Sci_TextToFind { Annotations are indented to match the text and are surrounded by a box. + + + ANNOTATION_INDENTED + + 3 + + Annotations are indented to match the text. + @@ -3159,6 +3186,7 @@ struct Sci_TextToFind {

Other settings

+ SCI_SETBUFFEREDDRAW(bool isBuffered)
SCI_GETBUFFEREDDRAW
SCI_SETPHASESDRAW(int phases)
@@ -3226,7 +3254,7 @@ struct Sci_TextToFind { the appearance in layers or phases. The coloured backgrounds for all lines are drawn before any text and then all the text is drawn in transparent mode over this combined background without clipping text to the line boundaries. This allows - extreme ascenders and decenders to overflow into the adjacent lines. + extreme ascenders and descenders to overflow into the adjacent lines. This mode is incompatible with buffered drawing and will act as SC_PHASES_TWO if buffered drawing is turned on. Multiple phase drawing is slower than two phase drawing. @@ -3242,16 +3270,20 @@ struct Sci_TextToFind { SCI_GETTECHNOLOGY
The technology property allows choosing between different drawing APIs and options. On most platforms, the only choice is SC_TECHNOLOGY_DEFAULT (0). - On Windows Vista or later, SC_TECHNOLOGY_DIRECTWRITE (1) or - SC_TECHNOLOGY_DIRECTWRITERETAIN (2) + On Windows Vista or later, SC_TECHNOLOGY_DIRECTWRITE (1), + SC_TECHNOLOGY_DIRECTWRITERETAIN (2), or + SC_TECHNOLOGY_DIRECTWRITEDC (3) can be chosen to use the Direct2D and DirectWrite APIs for higher quality antialiased drawing. SC_TECHNOLOGY_DIRECTWRITERETAIN differs from SC_TECHNOLOGY_DIRECTWRITE by requesting that the frame is retained after being presented which may prevent drawing failures on some cards and drivers. + SC_TECHNOLOGY_DIRECTWRITEDC differs from + SC_TECHNOLOGY_DIRECTWRITE by using DirectWrite to draw into a GDI DC. Since Direct2D buffers drawing, Scintilla's buffering can be turned off with SCI_SETBUFFEREDDRAW(0). - Since SC_TECHNOLOGY_DIRECTWRITERETAIN - is provisional, it may be changed or removed in a future release if a better solution is found.

+ Since SC_TECHNOLOGY_DIRECTWRITERETAIN and + SC_TECHNOLOGY_DIRECTWRITEDC + are provisional, they may be changed or removed in a future release if a better solution is found.

SCI_SETFONTQUALITY(int fontQuality)
SCI_GETFONTQUALITY
@@ -3868,10 +3900,11 @@ struct Sci_TextToFind { line of small 'T' shapes, a line of diagonal hatching, a strike-out or a rectangle around the text.

The SCI_INDIC* messages allow you to get and set the visual appearance of the - indicators. They all use an indicatorNumber argument in the range 0 to INDIC_MAX(31) + indicators. They all use an indicatorNumber argument in the range 0 to INDIC_MAX(35) to set the indicator to style. To prevent interference the set of indicators is divided up into a range for use - by lexers (0..7) and a range for use by containers - (8=INDIC_CONTAINER .. 31=INDIC_MAX).

+ by lexers (0..7) a range for use by containers + (8=INDIC_CONTAINER .. 31=INDIC_IME-1) + and a range for IME indicators (32=INDIC_IME .. 35=INDIC_IME_MAX).

Originally, Scintilla used a different technique for indicators but this has been removed @@ -4133,6 +4166,7 @@ struct Sci_TextToFind {

SCI_INDICATORALLONFOR(int position)
Retrieve a bitmap value representing which indicators are non-zero at a position. + Only the first 32 indicators are represented in the result so no IME indicators are included.

@@ -5515,7 +5549,6 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ -

SCI_EXPANDCHILDREN(int line, int level)
This is used to respond to a change to a line causing its fold level or whether it is a header to change, @@ -7430,8 +7463,11 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next

Provisional features are displayed in this document with a distinctive background colour.

There are currently no provisional messages. - The SC_TECHNOLOGY_DIRECTWRITERETAIN value for - SCI_SETTECHNOLOGY is provisional.

+ The SC_TECHNOLOGY_DIRECTWRITERETAIN and + SC_TECHNOLOGY_DIRECTWRITEDC values for + SCI_SETTECHNOLOGY are provisional.

+ +

Using C++11 <regex> is provisional.

Some developers may want to only use features that are stable and have graduated from provisional status. To avoid using provisional messages compile with the symbol @@ -7510,8 +7546,6 @@ EM_FORMATRANGE Any use of these symbols should be removed and replaced with standard indicators. SCI_GETSTYLEBITS and SCI_GETSTYLEBITSNEEDED always return 8, indicating that 8 bits are used for styling and there are 256 styles.

-

-

Edit messages never supported by Scintilla

@@ -7550,7 +7584,7 @@ EM_SETTARGETDEVICE
 
     

Removed features

-

Previous versions of Scintilla allowed indicators to be stord in bits of each style byte. +

Previous versions of Scintilla allowed indicators to be stored in bits of each style byte. This was deprecated in 2007 and removed in 2014 with release 3.4.3. All uses of style byte indicators should be replaced with standard indicators.

diff --git a/ext/scintilla/doc/ScintillaDownload.html b/ext/scintilla/doc/ScintillaDownload.html index da04e24c7..4677dc9af 100644 --- a/ext/scintilla/doc/ScintillaDownload.html +++ b/ext/scintilla/doc/ScintillaDownload.html @@ -25,9 +25,9 @@ @@ -41,7 +41,7 @@ containing very few restrictions.

- Release 3.5.1 + Release 3.5.2

Source Code @@ -49,8 +49,8 @@ The source code package contains all of the source code for Scintilla but no binary executable code and is available in
    -
  • zip format (1450K) commonly used on Windows
  • -
  • tgz format (1300K) commonly used on Linux and compatible operating systems
  • +
  • zip format (1450K) commonly used on Windows
  • +
  • tgz format (1300K) commonly used on Linux and compatible operating systems
Instructions for building on both Windows and Linux are included in the readme file.

diff --git a/ext/scintilla/doc/ScintillaHistory.html b/ext/scintilla/doc/ScintillaHistory.html index 6f931bdc1..d1afca38d 100644 --- a/ext/scintilla/doc/ScintillaHistory.html +++ b/ext/scintilla/doc/ScintillaHistory.html @@ -459,6 +459,10 @@

+ + + +
- + Windows   - + GTK+/Linux   danselmi Mat Berchtold Michael StaszewskiBaurzhan Muftakhidinov
Erik AngelinYusuf Ramazan Karagöz

@@ -471,6 +475,78 @@

+ Release 3.5.2 +

+
    +
  • + Released 2 December 2014. +
  • +
  • + For OS X Cocoa switch C++ runtime to libc++ to enable use of features that will never + be added to libstdc++ including those part of C++11. + Scintilla will now run only on OS X 10.7 or later and only in 64-bit mode. +
  • +
  • + Include support for using C++11 <regex> for regular expression searches. + Enabling this requires rebuilding Scintilla with a non-default option. + This is a provisional feature and may change API before being made permanent. +
  • +
  • + Allocate indicators used for Input Method Editors after 31 which was the previous limit of indicators to + ensure no clash between the use of indicators for IME and for the application. +
  • +
  • + ANNOTATION_INDENTED added which is similar to ANNOTATION_BOXED in terms of positioning + but does not show a border. +
  • +
  • + Allow platform overrides for drawing tab arrows, wrap markers, and line markers. + Size of double click detection area is a variable. + These enable better visuals and behaviour for PLAT_CURSES as it is character cell based. +
  • +
  • + CoffeeScript lexer fixes "/*" to not be a comment. + Bug #1420. +
  • +
  • + VHDL folder fixes "block" keyword. + Bug #1664. +
  • +
  • + Prevent caret blinking when holding down Delete key. + Bug #1657. +
  • +
  • + On Windows, allow right click selection in popup menu. + Feature #1080. +
  • +
  • + On Windows, only call ShowCaret in GDI mode as it interferes with caret drawing when using Direct2D. + Bug #1643. +
  • +
  • + On Windows, another DirectWrite mode SC_TECHNOLOGY_DIRECTWRITEDC added + which may avoid drawing failures in some circumstances by drawing into a GDI DC. + This feature is provisional and may be changed or removed if a better solution is found. +
  • +
  • + On Windows, avoid processing mouse move events where the mouse has not moved as these can + cause unexpected dwell start notifications. + Bug #1670. +
  • +
  • + For GTK+ on Windows, avoid extra space when pasting from external application. +
  • +
  • + On GTK+ 2.x allow Scintilla to be used inside tool tips by changing when preedit window created. + Bug #1662. +
  • +
  • + Support MinGW compilation under Linux. + Feature #1077. +
  • +
+

Release 3.5.1

    diff --git a/ext/scintilla/doc/index.html b/ext/scintilla/doc/index.html index 6d61562c1..89dd22c7c 100644 --- a/ext/scintilla/doc/index.html +++ b/ext/scintilla/doc/index.html @@ -9,7 +9,7 @@ - +