Skip to content
This repository has been archived by the owner on Aug 12, 2018. It is now read-only.

Commit

Permalink
Update Scintilla to v3.5.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Jan 20, 2015
1 parent 878af2f commit 346c069
Show file tree
Hide file tree
Showing 28 changed files with 2,232 additions and 403 deletions.
3 changes: 2 additions & 1 deletion build/makefile.deps.mak
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ $(SCI_SRC_OBJDIR)\Document.obj: \
$(SCI_SRC)\CaseFolder.h \
$(SCI_SRC)\Document.h \
$(SCI_SRC)\RESearch.h \
$(SCI_SRC)\UniConversion.h
$(SCI_SRC)\UniConversion.h \
$(SCI_SRC)\UnicodeFromUTF8.h

$(SCI_SRC_OBJDIR)\EditModel.obj: \
$(SCI_SRC)\EditModel.cxx \
Expand Down
1 change: 1 addition & 0 deletions scintilla/cppcheck.suppress
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ variableScope:scintilla/lexers/LexRuby.cxx
uninitMemberVar:scintilla/lexers/LexRuby.cxx
variableScope:scintilla/lexers/LexSpecman.cxx
unreadVariable:scintilla/lexers/LexSpice.cxx
clarifyCalculation:scintilla/lexers/LexTADS3.cxx
invalidscanf:scintilla/lexers/LexTCMD.cxx
variableScope:scintilla/lexers/LexTeX.cxx
variableScope:scintilla/lexers/LexVHDL.cxx
Expand Down
13 changes: 9 additions & 4 deletions scintilla/doc/ScintillaDoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

<h1>Scintilla Documentation</h1>

<p>Last edited 24 November 2014 NH</p>
<p>Last edited 10 January 2015 NH</p>

<p>There is <a class="jump" href="Design.html">an overview of the internal design of
Scintilla</a>.<br />
Expand Down Expand Up @@ -2577,11 +2577,15 @@ <h2 id="StyleDefinition">Style definition</h2>
<b id="SCI_STYLEGETITALIC">SCI_STYLEGETITALIC(int styleNumber)</b><br />
These messages (plus <a class="message"
href="#SCI_STYLESETCHARACTERSET"><code>SCI_STYLESETCHARACTERSET</code></a>) set the font
attributes that are used to match the fonts you request to those available. The
attributes that are used to match the fonts you request to those available.</p>
<p>The
<code>fontName</code> is a zero terminated string holding the name of a font. Under Windows,
only the first 32 characters of the name are used and the name is not case sensitive. For
only the first 32 characters of the name are used, the name is decoded as UTF-8, and the name is not case sensitive. For
internal caching, Scintilla tracks fonts by name and does care about the casing of font names,
so please be consistent. On GTK+, Pango is used to display text.</p>
so please be consistent.
On GTK+, Pango is used to display text and the name is sent directly to Pango without transformation.
On Qt, the name is decoded as UTF-8.
On Cocoa, the name is decoded as MacRoman.</p>
<p>Sizes can be set to a whole number of points with <code>SCI_STYLESETSIZE</code>
or to a fractional point size in hundredths of a point with <code>SCI_STYLESETSIZEFRACTIONAL</code>
by multiplying the size by 100 (<code>SC_FONT_SIZE_MULTIPLIER</code>).
Expand Down Expand Up @@ -7320,6 +7324,7 @@ <h2 id="Notifications">Notifications</h2>
These notifications are generated when the user clicks or double clicks on
text that is in a style with the hotspot attribute set.
This notification can be used to link to variable definitions or web pages.
In the notification handler, you should avoid calling any function that modifies the current selection or caret position.
The <code>position</code> field is set the text position of the click or
double click and the <code>modifiers</code> field set to the key modifiers
held down in a similar manner to <a class="message" href="#SCN_KEY">SCN_KEY</a>.
Expand Down
10 changes: 5 additions & 5 deletions scintilla/doc/ScintillaDownload.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
<font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla352.zip?download">
<font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla353.zip?download">
Windows</a>&nbsp;&nbsp;
<a href="http://prdownloads.sourceforge.net/scintilla/scintilla352.tgz?download">
<a href="http://prdownloads.sourceforge.net/scintilla/scintilla353.tgz?download">
GTK+/Linux</a>&nbsp;&nbsp;
</font>
</td>
Expand All @@ -41,16 +41,16 @@ <h2>
containing very few restrictions.
</p>
<h3>
Release 3.5.2
Release 3.5.3
</h3>
<h4>
Source Code
</h4>
The source code package contains all of the source code for Scintilla but no binary
executable code and is available in
<ul>
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla352.zip?download">zip format</a> (1450K) commonly used on Windows</li>
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla352.tgz?download">tgz format</a> (1300K) commonly used on Linux and compatible operating systems</li>
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla353.zip?download">zip format</a> (1450K) commonly used on Windows</li>
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla353.tgz?download">tgz format</a> (1300K) commonly used on Linux and compatible operating systems</li>
</ul>
Instructions for building on both Windows and Linux are included in the readme file.
<h4>
Expand Down
71 changes: 71 additions & 0 deletions scintilla/doc/ScintillaHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,8 @@ <h3>
</tr><tr>
<td>Erik Angelin</td>
<td>Yusuf Ramazan Karagöz</td>
<td>Markus Heidelberg</td>
<td>Joe Mueller</td>
</tr>
</table>
<p>
Expand All @@ -474,6 +476,74 @@ <h3>
Icons</a> Copyright(C) 1998 by Dean S. Jones<br />
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite353.zip?download">Release 3.5.3</a>
</h3>
<ul>
<li>
Released 20 January 2015.
</li>
<li>
Support removed for Windows 95, 98, and ME.
</li>
<li>
Lexers added for Motorola S-Record files, Intel hex files, and Tektronix extended hex files with folding for Intel hex files.
<a href="http://sourceforge.net/p/scintilla/feature-requests/1091/">Feature #1091.</a>
<a href="http://sourceforge.net/p/scintilla/feature-requests/1093/">Feature #1093.</a>
<a href="http://sourceforge.net/p/scintilla/feature-requests/1095/">Feature #1095.</a>
<a href="http://sourceforge.net/p/scintilla/feature-requests/1096/">Feature #1096.</a>
</li>
<li>
C++ folder allows folding on square brackets '['.
<a href="http://sourceforge.net/p/scintilla/feature-requests/1087/">Feature #1087.</a>
</li>
<li>
Shell lexer fixes three issues with here-documents.
<a href="http://sourceforge.net/p/scintilla/bugs/1672/">Bug #1672</a>.
</li>
<li>
Verilog lexer highlights doc comment keywords; has separate styles for input, output, and inout ports
(lexer.verilog.portstyling); fixes a bug in highlighting numbers; can treat upper-case identifiers as
keywords (lexer.verilog.allupperkeywords); and can use different styles for code that is inactive due
to preprocessor commands (lexer.verilog.track.preprocessor, lexer.verilog.update.preprocessor).
</li>
<li>
When the calltip window is taller than the Scintilla window, leave it in a
position that avoids overlapping the Scintilla text.
</li>
<li>
When a text margin is displayed, for annotation lines, use the background colour of the base line.
</li>
<li>
On Windows GDI, assume font names are encoded in UTF-8. This matches the Direct2D code path.
</li>
<li>
Fix paste for GTK+ on OS X.
<a href="http://sourceforge.net/p/scintilla/bugs/1677/">Bug #1677</a>.
</li>
<li>
Reverted a fix on Qt where Qt 5.3 has returned to the behaviour of 4.x.
<a href="http://sourceforge.net/p/scintilla/bugs/1575/">Bug #1575</a>.
</li>
<li>
When the mouse is on the line between margin and text changed to treat as within text.
This makes the PLAT_CURSES character cell platform work better.
</li>
<li>
Fix a crash in SciTE when the command line is just "-close:".
<a href="http://sourceforge.net/p/scintilla/bugs/1675/">Bug #1675</a>.
</li>
<li>
Fix unexpected dialog in SciTE on Windows when the command line has a quoted filename then ends with a space.
<a href="http://sourceforge.net/p/scintilla/bugs/1673/">Bug #1673</a>.
</li>
<li>
On Windows and GTK+, use indicators for inline IME.
</li>
<li>
SciTE shuts down quicker when there is no user-written OnClose function and no directors are attached.
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite352.zip?download">Release 3.5.2</a>
</h3>
Expand All @@ -498,6 +568,7 @@ <h3>
<li>
ANNOTATION_INDENTED added which is similar to ANNOTATION_BOXED in terms of positioning
but does not show a border.
<a href="http://sourceforge.net/p/scintilla/feature-requests/1086/">Feature #1086.</a>
</li>
<li>
Allow platform overrides for drawing tab arrows, wrap markers, and line markers.
Expand Down
7 changes: 4 additions & 3 deletions scintilla/doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
<meta name="Description"
content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
<meta name="Date.Modified" content="20141202" />
<meta name="Date.Modified" content="20150120" />
<style type="text/css">
#versionlist {
margin: 0;
Expand Down Expand Up @@ -55,8 +55,8 @@
GTK+, and OS X</font>
</td>
<td width="40%" align="right">
<font color="#FFCC99" size="3"> Release version 3.5.2<br />
Site last modified December 2 2014</font>
<font color="#FFCC99" size="3"> Release version 3.5.3<br />
Site last modified January 20 2015</font>
</td>
<td width="20%">
&nbsp;
Expand All @@ -71,6 +71,7 @@
</tr>
</table>
<ul id="versionlist">
<li>Version 3.5.3 removes support for Windows 95, 98, and ME.</li>
<li>Version 3.5.2 only supports 64-bit builds for OS X 10.7+ Cocoa. Provisional support of C++11 &lt;regex&gt;.</li>
<li>Version 3.5.1 fixes minor bugs and includes a lexer for BibTeX.</li>
<li>Version 3.5.0 can share space vertically so that extreme ascenders and descenders are not cut off.
Expand Down
5 changes: 5 additions & 0 deletions scintilla/include/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ class PRectangle {
return (pt.x >= left) && (pt.x <= right) &&
(pt.y >= top) && (pt.y <= bottom);
}
bool ContainsWholePixel(Point pt) const {
// Does the rectangle contain all of the pixel to left/below the point
return (pt.x >= left) && ((pt.x+1) <= right) &&
(pt.y >= top) && ((pt.y+1) <= bottom);
}
bool Contains(PRectangle rc) const {
return (rc.left >= left) && (rc.right <= right) &&
(rc.top >= top) && (rc.bottom <= bottom);
Expand Down
27 changes: 27 additions & 0 deletions scintilla/include/SciLexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
#define SCLEX_DMIS 114
#define SCLEX_REGISTRY 115
#define SCLEX_BIBTEX 116
#define SCLEX_SREC 117
#define SCLEX_IHEX 118
#define SCLEX_TEHEX 119
#define SCLEX_AHK 200
#define SCLEX_AUTOMATIC 1000
#define SCE_P_DEFAULT 0
Expand Down Expand Up @@ -899,6 +902,11 @@
#define SCE_V_IDENTIFIER 11
#define SCE_V_STRINGEOL 12
#define SCE_V_USER 19
#define SCE_V_COMMENT_WORD 20
#define SCE_V_INPUT 21
#define SCE_V_OUTPUT 22
#define SCE_V_INOUT 23
#define SCE_V_PORT_CONNECT 24
#define SCE_KIX_DEFAULT 0
#define SCE_KIX_COMMENT 1
#define SCE_KIX_STRING1 2
Expand Down Expand Up @@ -1763,6 +1771,25 @@
#define SCE_BIBTEX_PARAMETER 4
#define SCE_BIBTEX_VALUE 5
#define SCE_BIBTEX_COMMENT 6
#define SCE_HEX_DEFAULT 0
#define SCE_HEX_RECSTART 1
#define SCE_HEX_RECTYPE 2
#define SCE_HEX_RECTYPE_UNKNOWN 3
#define SCE_HEX_BYTECOUNT 4
#define SCE_HEX_BYTECOUNT_WRONG 5
#define SCE_HEX_NOADDRESS 6
#define SCE_HEX_DATAADDRESS 7
#define SCE_HEX_RECCOUNT 8
#define SCE_HEX_STARTADDRESS 9
#define SCE_HEX_ADDRESSFIELD_UNKNOWN 10
#define SCE_HEX_EXTENDEDADDRESS 11
#define SCE_HEX_DATA_ODD 12
#define SCE_HEX_DATA_EVEN 13
#define SCE_HEX_DATA_UNKNOWN 14
#define SCE_HEX_DATA_EMPTY 15
#define SCE_HEX_CHECKSUM 16
#define SCE_HEX_CHECKSUM_WRONG 17
#define SCE_HEX_GARBAGE 18
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */

#endif
33 changes: 33 additions & 0 deletions scintilla/include/Scintilla.iface
Original file line number Diff line number Diff line change
Expand Up @@ -2719,6 +2719,9 @@ val SCLEX_AS=113
val SCLEX_DMIS=114
val SCLEX_REGISTRY=115
val SCLEX_BIBTEX=116
val SCLEX_SREC=117
val SCLEX_IHEX=118
val SCLEX_TEHEX=119
## notepad2 custom code for the AHK lexer - start
val SCLEX_AHK=200
## notepad2 custom code for the AHK lexer - end
Expand Down Expand Up @@ -3602,6 +3605,11 @@ val SCE_V_OPERATOR=10
val SCE_V_IDENTIFIER=11
val SCE_V_STRINGEOL=12
val SCE_V_USER=19
val SCE_V_COMMENT_WORD=20
val SCE_V_INPUT=21
val SCE_V_OUTPUT=22
val SCE_V_INOUT=23
val SCE_V_PORT_CONNECT=24
# Lexical states for SCLEX_KIX
lex Kix=SCLEX_KIX SCE_KIX_
val SCE_KIX_DEFAULT=0
Expand Down Expand Up @@ -4570,6 +4578,31 @@ val SCE_BIBTEX_KEY=3
val SCE_BIBTEX_PARAMETER=4
val SCE_BIBTEX_VALUE=5
val SCE_BIBTEX_COMMENT=6
# Lexical state for SCLEX_SREC
lex Srec=SCLEX_SREC SCE_HEX_
val SCE_HEX_DEFAULT=0
val SCE_HEX_RECSTART=1
val SCE_HEX_RECTYPE=2
val SCE_HEX_RECTYPE_UNKNOWN=3
val SCE_HEX_BYTECOUNT=4
val SCE_HEX_BYTECOUNT_WRONG=5
val SCE_HEX_NOADDRESS=6
val SCE_HEX_DATAADDRESS=7
val SCE_HEX_RECCOUNT=8
val SCE_HEX_STARTADDRESS=9
val SCE_HEX_ADDRESSFIELD_UNKNOWN=10
val SCE_HEX_EXTENDEDADDRESS=11
val SCE_HEX_DATA_ODD=12
val SCE_HEX_DATA_EVEN=13
val SCE_HEX_DATA_UNKNOWN=14
val SCE_HEX_DATA_EMPTY=15
val SCE_HEX_CHECKSUM=16
val SCE_HEX_CHECKSUM_WRONG=17
val SCE_HEX_GARBAGE=18
# Lexical state for SCLEX_IHEX (shared with Srec)
lex IHex=SCLEX_IHEX SCE_HEX_
# Lexical state for SCLEX_TEHEX (shared with Srec)
lex TEHex=SCLEX_TEHEX SCE_HEX_

# Events

Expand Down
14 changes: 9 additions & 5 deletions scintilla/lexers/LexBash.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,6 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
sc.Forward();
HereDoc.Quoted = true;
HereDoc.State = 1;
} else if (!HereDoc.Indent && sc.chNext == '-') { // <<- indent case
HereDoc.Indent = true;
} else if (setHereDoc.Contains(sc.chNext)) {
// an unquoted here-doc delimiter, no special handling
// TODO check what exactly bash considers part of the delim
Expand Down Expand Up @@ -469,7 +467,7 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
if (sc.atLineStart) {
sc.SetState(SCE_SH_HERE_Q);
int prefixws = 0;
while (IsASpace(sc.ch) && !sc.atLineEnd) { // whitespace prefix
while (sc.ch == '\t' && !sc.atLineEnd) { // tabulation prefix
sc.Forward();
prefixws++;
}
Expand All @@ -481,7 +479,8 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
char s[HERE_DELIM_MAX];
sc.GetCurrent(s, sizeof(s));
if (sc.LengthCurrent() == 0) { // '' or "" delimiters
if (prefixws == 0 && HereDoc.Quoted && HereDoc.DelimiterLength == 0)
if ((prefixws == 0 || HereDoc.Indent) &&
HereDoc.Quoted && HereDoc.DelimiterLength == 0)
sc.SetState(SCE_SH_DEFAULT);
break;
}
Expand Down Expand Up @@ -672,7 +671,12 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
} else if (sc.Match('<', '<')) {
sc.SetState(SCE_SH_HERE_DELIM);
HereDoc.State = 0;
HereDoc.Indent = false;
if (sc.GetRelative(2) == '-') { // <<- indent case
HereDoc.Indent = true;
sc.Forward();
} else {
HereDoc.Indent = false;
}
} else if (sc.ch == '-' && // one-char file test operators
setSingleCharOp.Contains(sc.chNext) &&
!setWord.Contains(sc.GetRelative(2)) &&
Expand Down
4 changes: 2 additions & 2 deletions scintilla/lexers/LexCPP.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1344,14 +1344,14 @@ void SCI_METHOD LexerCPP::Fold(unsigned int startPos, int length, int initStyle,
}
}
if (options.foldSyntaxBased && (style == SCE_C_OPERATOR)) {
if (ch == '{') {
if (ch == '{' || ch == '[') {
// Measure the minimum before a '{' to allow
// folding on "} else {"
if (levelMinCurrent > levelNext) {
levelMinCurrent = levelNext;
}
levelNext++;
} else if (ch == '}') {
} else if (ch == '}' || ch == ']') {
levelNext--;
}
}
Expand Down
Loading

0 comments on commit 346c069

Please sign in to comment.