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.7.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Feb 28, 2017
1 parent a8257d7 commit 5b38c6a
Show file tree
Hide file tree
Showing 25 changed files with 407 additions and 87 deletions.
3 changes: 0 additions & 3 deletions scintilla/cppcheck.suppress
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ useInitializationList
// Some non-explicit constructors are used for conversions or are private to lexers
noExplicitConstructor

// cppcheck does not understand private methods can be called from static methods
unusedPrivateFunction:scintilla/win32/PlatWin.cxx

// ScintillaDocument is providing an API and there are no consumers of the API inside Scintilla
unusedFunction:scintilla/qt/ScintillaEdit/ScintillaDocument.cpp

Expand Down
14 changes: 7 additions & 7 deletions scintilla/doc/ScintillaDoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1536,8 +1536,8 @@ <h2 id="MultipleSelectionAndVirtualSpace">Multiple Selection and Virtual Space</
<a class="message" href="#SCI_GETSELECTIONS">SCI_GETSELECTIONS &rarr; int</a><br />
<a class="message" href="#SCI_GETSELECTIONEMPTY">SCI_GETSELECTIONEMPTY &rarr; bool</a><br />
<a class="message" href="#SCI_CLEARSELECTIONS">SCI_CLEARSELECTIONS</a><br />
<a class="message" href="#SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor) &rarr; int</a><br />
<a class="message" href="#SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor) &rarr; int</a><br />
<a class="message" href="#SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor)</a><br />
<a class="message" href="#SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor)</a><br />
<a class="message" href="#SCI_DROPSELECTIONN">SCI_DROPSELECTIONN(int selection)</a><br />
<a class="message" href="#SCI_SETMAINSELECTION">SCI_SETMAINSELECTION(int selection)</a><br />
<a class="message" href="#SCI_GETMAINSELECTION">SCI_GETMAINSELECTION &rarr; int</a><br />
Expand Down Expand Up @@ -1667,11 +1667,11 @@ <h2 id="MultipleSelectionAndVirtualSpace">Multiple Selection and Virtual Space</
Set a single empty selection at 0 as the only selection.</p>

<p>
<b id="SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor) &rarr; int</b><br />
<b id="SCI_SETSELECTION">SCI_SETSELECTION(int caret, int anchor)</b><br />
Set a single selection from <code class="parameter">anchor</code> to <code class="parameter">caret</code> as the only selection.</p>

<p>
<b id="SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor) &rarr; int</b><br />
<b id="SCI_ADDSELECTION">SCI_ADDSELECTION(int caret, int anchor)</b><br />
Add a new selection from <code class="parameter">anchor</code> to <code class="parameter">caret</code> as the main selection retaining all other
selections as additional selections.
Since there is always at least one selection, to set a list of selections, the first selection should be
Expand Down Expand Up @@ -5374,7 +5374,7 @@ <h2 id="PopupEditMenu">Popup edit menu</h2>
<tr>
<td align="left"><code>SC_POPUP_NEVER</code></td>

<td align="center">0x01</td>
<td align="center">0</td>

<td>Never show default editing menu.</td>

Expand All @@ -5383,7 +5383,7 @@ <h2 id="PopupEditMenu">Popup edit menu</h2>
<tr>
<td align="left"><code>SC_POPUP_ALL</code></td>

<td align="center">0x02</td>
<td align="center">1</td>

<td>Show default editing menu if clicking on scintilla.</td>

Expand All @@ -5392,7 +5392,7 @@ <h2 id="PopupEditMenu">Popup edit menu</h2>
<tr>
<td align="left"><code>SC_POPUP_TEXT</code></td>

<td align="center">0x04</td>
<td align="center">2</td>

<td>Show default editing menu only if clicking on text area.</td>

Expand Down
10 changes: 5 additions & 5 deletions scintilla/doc/ScintillaDownload.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
<font size="4"> <a href="http://www.scintilla.org/scintilla372.zip">
<font size="4"> <a href="http://www.scintilla.org/scintilla373.zip">
Windows</a>&nbsp;&nbsp;
<a href="http://www.scintilla.org/scintilla372.tgz">
<a href="http://www.scintilla.org/scintilla373.tgz">
GTK+/Linux</a>&nbsp;&nbsp;
</font>
</td>
Expand All @@ -42,16 +42,16 @@ <h2>
containing very few restrictions.
</p>
<h3>
Release 3.7.2
Release 3.7.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://www.scintilla.org/scintilla372.zip">zip format</a> (1600K) commonly used on Windows</li>
<li><a href="http://www.scintilla.org/scintilla372.tgz">tgz format</a> (1400K) commonly used on Linux and compatible operating systems</li>
<li><a href="http://www.scintilla.org/scintilla373.zip">zip format</a> (1600K) commonly used on Windows</li>
<li><a href="http://www.scintilla.org/scintilla373.tgz">tgz format</a> (1400K) 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
89 changes: 86 additions & 3 deletions scintilla/doc/ScintillaHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,13 @@ <h3>
<td>jedailey</td>
<td>oirfeodent</td>
<td>A-R-C-A</td>
</tr>
</tr><tr>
<td>Roberto Rossi</td>
<td>Kenny Liu</td>
<td>Iain Clarke</td>
<td>desto</td>
</tr><tr>
<td>John Flatness</td>
</tr>
</table>
<p>
Expand All @@ -517,17 +519,98 @@ <h3>
Icons</a> Copyright(C) 1998 by Dean S. Jones<br />
</li>
</ul>
<h3>
<a href="http://www.scintilla.org/scite374.zip">Release 3.7.4</a>
</h3>
<ul>
<li>
Released 19 February 2017.
</li>
<li>
Fix to stream selection mode when moving caret up or down.
<a href="http://sourceforge.net/p/scintilla/bugs/1905/">Bug #1905</a>.
</li>
<li>
Fix crash on Cocoa with OS X 10.9 due to accessibility API not available.
<a href="http://sourceforge.net/p/scintilla/bugs/1915/">Bug #1915</a>.
</li>
<li>
Fix crash in accessibility code on GTK+ &lt; 3.3.6 caused by previous bug fix.
<a href="http://sourceforge.net/p/scintilla/bugs/1907/">Bug #1907</a>.
</li>
<li>
Fix to prevent double scrolling on GTK+ with X11.
<a href="http://sourceforge.net/p/scintilla/bugs/1901/">Bug #1901</a>.
</li>
<li>
SciTE on GTK+ has changed file chooser behaviour for some actions:
overwriting an existing file shows a warning;
the default session file name "SciTE.session" is shown and a "*.session" filter is applied;
appropriate filters are applied when exporting;
the current file name is displayed in "Save As" even when that file no longer exists.
</li>
</ul>
<h3>
<a href="http://www.scintilla.org/scite373.zip">Release 3.7.3</a>
</h3>
<ul>
<li>
Released 30 December 2016.
Released 19 February 2017.
</li>
<li>
The Python lexer partly supports f-strings, allows Unicode identifiers, and no longer allows @1 to be a decorator.
Display block caret over the character at the end of a selection to be similar
to other editors.
</li>
<li>
In SciTE can choose colours for fold markers.
<a href="http://sourceforge.net/p/scintilla/feature-requests/1172/">Feature #1172.</a>
</li>
<li>
In SciTE can hide buffer numbers in tabs.
<a href="http://sourceforge.net/p/scintilla/feature-requests/1173/">Feature #1173.</a>
</li>
<li>
The Diff lexer recognizes deleted lines that start with "--- ".
</li>
<li>
The Lua lexer requires the first line to start with "#!" to be treated as a shebang comment,
not just "#".
<a href="http://sourceforge.net/p/scintilla/bugs/1900/">Bug #1900</a>.
</li>
<li>
The Matlab lexer requires block comment start and end to be alone on a line.
<a href="http://sourceforge.net/p/scintilla/bugs/1902/">Bug #1902</a>.
</li>
<li>
The Python lexer supports f-strings with new styles, allows Unicode identifiers,
and no longer allows @1 to be a decorator.
<a href="http://sourceforge.net/p/scintilla/bugs/1848/">Bug #1848</a>.
</li>
<li>
Fix folding inconsistency when fold header added above a folded part.
Avoid unnecessary unfolding when a deletion does not include a line end.
<a href="http://sourceforge.net/p/scintilla/bugs/1896/">Bug #1896</a>.
</li>
<li>
Fix finalization crash on Cocoa.
<a href="http://sourceforge.net/p/scintilla/bugs/1909/">Bug #1909</a>.
</li>
<li>
SciTE on GTK+ can have a wide divider between the panes with the
split.wide property.
</li>
<li>
Fix display of autocompletion lists and calltips on GTK+ 3.22 on Wayland.
Newer APIs used on GTK+ 3.22 as older APIs were deprecated.
</li>
<li>
Fix crash in accessibility code on GTK+ due to signal receipt after destruction.
<a href="http://sourceforge.net/p/scintilla/bugs/1907/">Bug #1907</a>.
</li>
<li>
Make trackpad scrolling work on Wayland.
<a href="http://sourceforge.net/p/scintilla/bugs/1901/">Bug #1901</a>.
</li>
</ul>
<h3>
<a href="http://www.scintilla.org/scite372.zip">Release 3.7.2</a>
Expand Down
9 changes: 4 additions & 5 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="20161230" />
<meta name="Date.Modified" content="20170219" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
#versionlist {
Expand Down Expand Up @@ -56,8 +56,8 @@
GTK+, and OS X</font>
</td>
<td width="40%" align="right">
<font color="#FFCC99" size="3"> Release version 3.7.2<br />
Site last modified December 30 2016</font>
<font color="#FFCC99" size="3"> Release version 3.7.3<br />
Site last modified February 19 2017</font>
</td>
<td width="20%">
&nbsp;
Expand All @@ -72,12 +72,11 @@
</tr>
</table>
<ul id="versionlist">
<li>Version 3.7.3 fixes problems with GTK+ on Wayland.</li>
<li>Version 3.7.2 fixes some crashes on GTK+ and Cocoa, commonly at destruction.</li>
<li>Version 3.7.1 supports accessibility on GTK+ and Cocoa.
The Scintilla namespace is not exposed in Scintilla.h and some deprecated APIs were removed.</li>
<li>Version 3.7.0 improves word selection, navigation, and manipulation for UTF-8 documents.</li>
<li>Version 3.6.7 changes SC_CHARSET_DEFAULT on Windows to mean European code page 1252 unless a code page is set.</li>
<li>Version 3.6.6 enables C++11 &lt;regex&gt; by default.</li>
</ul>
<ul id="menu">
<li id="remote1"><a href="http://www.scintilla.org/SciTEImage.html">Screenshot</a></li>
Expand Down
4 changes: 4 additions & 0 deletions scintilla/include/SciLexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@
#define SCE_P_STRINGEOL 13
#define SCE_P_WORD2 14
#define SCE_P_DECORATOR 15
#define SCE_P_FSTRING 16
#define SCE_P_FCHARACTER 17
#define SCE_P_FTRIPLE 18
#define SCE_P_FTRIPLEDOUBLE 19
#define SCE_C_DEFAULT 0
#define SCE_C_COMMENT 1
#define SCE_C_COMMENTLINE 2
Expand Down
8 changes: 6 additions & 2 deletions scintilla/include/Scintilla.iface
Original file line number Diff line number Diff line change
Expand Up @@ -2354,10 +2354,10 @@ get bool GetSelectionEmpty=2650(,)
fun void ClearSelections=2571(,)

# Set a simple selection
fun int SetSelection=2572(position caret, position anchor)
fun void SetSelection=2572(position caret, position anchor)

# Add a selection
fun int AddSelection=2573(position caret, position anchor)
fun void AddSelection=2573(position caret, position anchor)

# Drop one selection
fun void DropSelectionN=2671(int selection,)
Expand Down Expand Up @@ -2917,6 +2917,10 @@ val SCE_P_COMMENTBLOCK=12
val SCE_P_STRINGEOL=13
val SCE_P_WORD2=14
val SCE_P_DECORATOR=15
val SCE_P_FSTRING=16
val SCE_P_FCHARACTER=17
val SCE_P_FTRIPLE=18
val SCE_P_FTRIPLEDOUBLE=19
# Lexical states for SCLEX_CPP, SCLEX_BULLANT, SCLEX_COBOL, SCLEX_TACL, SCLEX_TAL
lex Cpp=SCLEX_CPP SCE_C_
lex BullAnt=SCLEX_BULLANT SCE_C_
Expand Down
4 changes: 3 additions & 1 deletion scintilla/lexers/LexDiff.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ static void ColouriseDiffLine(char *lineBuffer, Sci_Position endLine, Accessor &
styler.ColourTo(endLine, SCE_DIFF_POSITION);
else if (lineBuffer[3] == '\r' || lineBuffer[3] == '\n')
styler.ColourTo(endLine, SCE_DIFF_POSITION);
else
else if (lineBuffer[3] == ' ')
styler.ColourTo(endLine, SCE_DIFF_HEADER);
else
styler.ColourTo(endLine, SCE_DIFF_DELETED);
} else if (0 == strncmp(lineBuffer, "+++ ", 4)) {
// I don't know of any diff where "+++ " is a position marker, but for
// consistency, do the same as with "--- " and "*** ".
Expand Down
4 changes: 2 additions & 2 deletions scintilla/lexers/LexLua.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ static void ColouriseLuaDoc(
}

StyleContext sc(startPos, length, initStyle, styler);
if (startPos == 0 && sc.ch == '#') {
// shbang line: # is a comment only if first char of the script
if (startPos == 0 && sc.ch == '#' && sc.chNext == '!') {
// shbang line: "#!" is a comment only if located at the start of the script
sc.SetState(SCE_LUA_COMMENTLINE);
}
for (; sc.More(); sc.Forward()) {
Expand Down
33 changes: 24 additions & 9 deletions scintilla/lexers/LexMatlab.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
**
** Changes by John Donoghue 2016/11/15
** - update matlab code folding
**
** Changes by John Donoghue 2017/01/18
** - update matlab block comment detection
**/
// Copyright 1998-2001 by Neil Hodgson <[email protected]>
// The License.txt file describes the conditions under which this software may be distributed.
Expand Down Expand Up @@ -73,6 +76,15 @@ static int CheckKeywordFoldPoint(char *str) {
return 0;
}

static bool IsSpaceToEOL(Sci_Position startPos, Accessor &styler) {
Sci_Position line = styler.GetLine(startPos);
Sci_Position eol_pos = styler.LineStart(line + 1) - 1;
for (Sci_Position i = startPos; i < eol_pos; i++) {
char ch = styler[i];
if(!IsASpace(ch)) return false;
}
return true;
}

static void ColouriseMatlabOctaveDoc(
Sci_PositionU startPos, Sci_Position length, int initStyle,
Expand Down Expand Up @@ -180,7 +192,7 @@ static void ColouriseMatlabOctaveDoc(
}
} else if (sc.state == SCE_MATLAB_COMMENT) {
// end or start of a nested a block comment?
if( IsCommentChar(sc.ch) && sc.chNext == '}' && nonSpaceColumn == column) {
if( IsCommentChar(sc.ch) && sc.chNext == '}' && nonSpaceColumn == column && IsSpaceToEOL(sc.currentPos+2, styler)) {
if(commentDepth > 0) commentDepth --;

curLine = styler.GetLine(sc.currentPos);
Expand All @@ -192,7 +204,7 @@ static void ColouriseMatlabOctaveDoc(
transpose = false;
}
}
else if( IsCommentChar(sc.ch) && sc.chNext == '{' && nonSpaceColumn == column)
else if( IsCommentChar(sc.ch) && sc.chNext == '{' && nonSpaceColumn == column && IsSpaceToEOL(sc.currentPos+2, styler))
{
commentDepth ++;

Expand All @@ -214,8 +226,11 @@ static void ColouriseMatlabOctaveDoc(
if (sc.state == SCE_MATLAB_DEFAULT) {
if (IsCommentChar(sc.ch)) {
// ncrement depth if we are a block comment
if(sc.chNext == '{' && nonSpaceColumn == column)
commentDepth ++;
if(sc.chNext == '{' && nonSpaceColumn == column) {
if(IsSpaceToEOL(sc.currentPos+2, styler)) {
commentDepth ++;
}
}
curLine = styler.GetLine(sc.currentPos);
styler.SetLineState(curLine, commentDepth);
sc.SetState(SCE_MATLAB_COMMENT);
Expand Down Expand Up @@ -284,13 +299,13 @@ static void FoldMatlabOctaveDoc(Sci_PositionU startPos, Sci_Position length, int
style = styleNext;
styleNext = styler.StyleAt(i + 1);
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');

// a line that starts with a comment
if (style == SCE_MATLAB_COMMENT && IsComment(ch) && visibleChars == 0) {
// start/end of block comment
if (chNext == '{')
// start/end of block comment
if (chNext == '{' && IsSpaceToEOL(i+2, styler))
levelNext ++;
if (chNext == '}')
if (chNext == '}' && IsSpaceToEOL(i+2, styler))
levelNext --;
}
// keyword
Expand All @@ -303,7 +318,7 @@ static void FoldMatlabOctaveDoc(Sci_PositionU startPos, Sci_Position length, int
if (styleNext != SCE_MATLAB_KEYWORD) {
word[wordlen] = '\0';
wordlen = 0;

levelNext += CheckKeywordFoldPoint(word);
}
}
Expand Down
Loading

1 comment on commit 5b38c6a

@refack
Copy link

@refack refack commented on 5b38c6a Mar 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

Please sign in to comment.