Skip to content

Commit

Permalink
Updated to Scintilla 5.4.1 & Lexilla 5.3.0
Browse files Browse the repository at this point in the history
Scintilla 5.4.1
https://www.scintilla.org/scintilla541.zip
Released 27 December 2023.

1.  Add IDocumentEditable interface to allow efficient interaction with document objects which may not be visible in a Scintilla instance. This feature is provisonal and may change before being declared stable. For better type-safety, the ScintillaCall C++ API uses IDocumentEditable* where void* was used before which may require changes to client code that uses document pointer APIs DocPointer, SetDocPointer, CreateDocument, AddRefDocument, and ReleaseDocument.
2.  Ctrl-click on a selection deselects it in multiple selection mode.
3.  Add SCI_SELECTIONFROMPOINT for modifying multiple selections.
4.  Add SCI_SETMOVEEXTENDSSELECTION and SCI_CHANGESELECTIONMODE to simplify selection mode manipulation.
5.  Improve performance of global replace by reducing cache invalidation overhead. [Feature #1502](https://sourceforge.net/p/scintilla/feature-requests/1502/).
6.  Fix regular expression search for "\<" matching beginning of search when not beginning of word and for "\>" not matching line end. [Bug #2157](https://sourceforge.net/p/scintilla/bugs/2157/).
7.  Fix regular expression search failure when search for "\<" followed by search for "\>". [Bug #2413](https://sourceforge.net/p/scintilla/bugs/2413/).
8.  Fix regular expression assertion (^, $, \b. \B) failures when using SCFIND_CXX11REGEX. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/).
9.  Fix regular expression bug in reverse direction where shortened match returned. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/).
10. Avoid character fragments in regular expression search results. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/).
11. With a document that does not have the SC_DOCUMENTOPTION_TEXT_LARGE option set, allocating more than 2G (calling SCI_ALLOCATE or similar) will now fail with SC_STATUS_FAILURE.
12. Protect SCI_REPLACETARGET, SCI_REPLACETARGETMINIMAL, and SCI_REPLACETARGETRE from application changing target in notification handlers. [Bug #2289](https://sourceforge.net/p/scintilla/bugs/2289/).

Lexilla 5.3.0
https://www.scintilla.org/lexilla530.zip
Released 27 December 2023.

1. Fix calling AddStaticLexerModule by defining as C++ instead of C which matches header. [Bug #2421](https://sourceforge.net/p/scintilla/bugs/2421/).
2. Bash: Fix shift operator << incorrectly recognized as here-doc. [Issue #215](ScintillaOrg/lexilla#215).
3. Bash: Fix termination of '${' with first unquoted '}' instead of nesting. [Issue #216](ScintillaOrg/lexilla#216).
4. HTML: JavaScript double-quoted strings may escape line end with '\'. [Issue #214](ScintillaOrg/lexilla#214).
5. Lua: recognize --- doc comments. Defined by [LDoc](https://github.com/lunarmodules/ldoc). Does not recognize --[[-- doc comments which seem less common.

Close #14375
  • Loading branch information
chcg authored and donho committed Dec 26, 2023
1 parent 78d0e7e commit dcc7e60
Show file tree
Hide file tree
Showing 87 changed files with 1,955 additions and 830 deletions.
Binary file not shown.
Binary file not shown.
8 changes: 5 additions & 3 deletions lexilla/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,21 @@ __pycache__
*.bsc
*.intermediate.manifest
*.lastbuildstate
*.nativecodeanalysis.xml
*.cache
*.ilk
*.ncb
*.tlog
*.sdf
gtk/*.plist
win32/*.plist
*.nativecodeanalysis.xml
*.opt
*.plg
*.pbxbtree
*.mode1v3
*.pbxuser
*.pbproj
*.tgz
*.log
*.xcbkptlist
*.xcuserstate
Expand All @@ -49,17 +50,18 @@ xcuserdata/
xcschememanagement.plist
.DS_Store
test/TestLexers
Debug
Release
Debug
x64
ARM64
cocoa/build
cocoa/ScintillaFramework/build
cocoa/ScintillaTest/build
macosx/SciTest/build
*.cppcheck
*.pro.user
.qmake.stash
cov-int
*.tgz
.vs
meson-private
meson-logs
Expand Down
10 changes: 5 additions & 5 deletions lexilla/doc/Lexilla.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="20231105" />
<meta name="Date.Modified" content="20231227" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
.logo {
Expand Down Expand Up @@ -61,8 +61,8 @@
<font color="#FFCC99" size="4"> A library of language lexers for use with Scintilla</font>
</td>
<td width="40%" align="right">
<font color="#FFCC99" size="3">Release version 5.2.8<br />
Site last modified November 5 2023</font>
<font color="#FFCC99" size="3">Release version 5.3.0<br />
Site last modified December 27 2023</font>
</td>
<td width="20%">
&nbsp;
Expand All @@ -77,11 +77,11 @@
</tr>
</table>
<ul id="versionlist">
<li>Version 5.3.0 improves Bash, HTML, and Lua.</li>
<li>Version 5.2.9 fixes potential problems on macOS 12 and older when built with Xcode 15.0.</li>
<li>Version 5.2.8 improves Python and R.</li>
<li>Version 5.2.7 improves Bash, F#, and HTML.</li>
<li>Version 5.2.6 improves Bash, Errorlist, HTML, Matlab, and Visual Prolog.</li>
<li>Version 5.2.5 improves Bash, Batch, F#, and VB.</li>
<li>Version 5.2.4 improves C++ and GDScript.</li>
</ul>
<ul id="menu">
<li id="remote1"><a href="https://www.scintilla.org/SciTEImage.html">Screenshot</a></li>
Expand Down
10 changes: 5 additions & 5 deletions lexilla/doc/LexillaDownload.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="https://www.scintilla.org/lexilla528.zip">
<font size="4"> <a href="https://www.scintilla.org/lexilla530.zip">
Windows</a>&nbsp;&nbsp;
<a href="https://www.scintilla.org/lexilla528.tgz">
<a href="https://www.scintilla.org/lexilla530.tgz">
GTK/Linux</a>&nbsp;&nbsp;
</font>
</td>
Expand All @@ -42,16 +42,16 @@ <h2>
containing very few restrictions.
</p>
<h3>
Release 5.2.8
Release 5.3.0
</h3>
<h4>
Source Code
</h4>
The source code package contains all of the source code for Lexilla but no binary
executable code and is available in
<ul>
<li><a href="https://www.scintilla.org/lexilla528.zip">zip format</a> (1.3M) commonly used on Windows</li>
<li><a href="https://www.scintilla.org/lexilla528.tgz">tgz format</a> (0.9M) commonly used on Linux and compatible operating systems</li>
<li><a href="https://www.scintilla.org/lexilla530.zip">zip format</a> (1.3M) commonly used on Windows</li>
<li><a href="https://www.scintilla.org/lexilla530.tgz">tgz format</a> (0.9M) 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
41 changes: 41 additions & 0 deletions lexilla/doc/LexillaHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,50 @@ <h2>Contributors</h2>
</tr><tr>
<td>German Aizek</td>
<td>Tsuyoshi Miyake</td>
<td>Martin Schäfer</td>
</tr>
</table>
<h2>Releases</h2>
<h3>
<a href="https://www.scintilla.org/lexilla530.zip">Release 5.3.0</a>
</h3>
<ul>
<li>
Released 27 December 2023.
</li>
<li>
Fix calling AddStaticLexerModule by defining as C++ instead of C which matches header.
<a href="https://sourceforge.net/p/scintilla/bugs/2421/">Bug #2421</a>.
</li>
<li>
Bash: Fix shift operator &lt;&lt; incorrectly recognized as here-doc.
<a href="https://github.com/ScintillaOrg/lexilla/issues/215">Issue #215</a>.
</li>
<li>
Bash: Fix termination of '${' with first unquoted '}' instead of nesting.
<a href="https://github.com/ScintillaOrg/lexilla/issues/216">Issue #216</a>.
</li>
<li>
HTML: JavaScript double-quoted strings may escape line end with '\'.
<a href="https://github.com/ScintillaOrg/lexilla/issues/214">Issue #214</a>.
</li>
<li>
Lua: recognize --- doc comments.
Defined by <a href="https://github.com/lunarmodules/ldoc">LDoc</a>.
Does not recognize --[[-- doc comments which seem less common.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/lexilla529.zip">Release 5.2.9</a>
</h3>
<ul>
<li>
Released 18 November 2023.
</li>
<li>
Xcode build settings changed to avoid problems with Xcode 15.0.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/lexilla528.zip">Release 5.2.8</a>
</h3>
Expand Down
14 changes: 7 additions & 7 deletions lexilla/include/Lexilla.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ using Scintilla::ILexer5;
typedef void ILexer5;
#endif

typedef ILexer5 *(*LexerFactoryFunction)();
typedef ILexer5 *(*LexerFactoryFunction)(void);

#if defined(__cplusplus)
namespace Lexilla {
#endif

typedef int (LEXILLA_CALL *GetLexerCountFn)();
typedef int (LEXILLA_CALL *GetLexerCountFn)(void);
typedef void (LEXILLA_CALL *GetLexerNameFn)(unsigned int Index, char *name, int buflength);
typedef LexerFactoryFunction(LEXILLA_CALL *GetLexerFactoryFn)(unsigned int Index);
typedef ILexer5*(LEXILLA_CALL *CreateLexerFn)(const char *name);
DEPRECATE_DEFINITION typedef const char *(LEXILLA_CALL *LexerNameFromIDFn)(int identifier);
typedef const char *(LEXILLA_CALL *GetLibraryPropertyNamesFn)();
typedef const char *(LEXILLA_CALL *GetLibraryPropertyNamesFn)(void);
typedef void(LEXILLA_CALL *SetLibraryPropertyFn)(const char *key, const char *value);
typedef const char *(LEXILLA_CALL *GetNameSpaceFn)();
typedef const char *(LEXILLA_CALL *GetNameSpaceFn)(void);

#if defined(__cplusplus)
}
Expand All @@ -85,13 +85,13 @@ extern "C" {
#endif

ILexer5 * LEXILLA_CALL CreateLexer(const char *name);
int LEXILLA_CALL GetLexerCount();
int LEXILLA_CALL GetLexerCount(void);
void LEXILLA_CALL GetLexerName(unsigned int index, char *name, int buflength);
LexerFactoryFunction LEXILLA_CALL GetLexerFactory(unsigned int index);
DEPRECATE_DEFINITION const char *LEXILLA_CALL LexerNameFromID(int identifier);
const char * LEXILLA_CALL GetLibraryPropertyNames();
const char * LEXILLA_CALL GetLibraryPropertyNames(void);
void LEXILLA_CALL SetLibraryProperty(const char *key, const char *value);
const char *LEXILLA_CALL GetNameSpace();
const char *LEXILLA_CALL GetNameSpace(void);

#if defined(__cplusplus)
}
Expand Down
10 changes: 4 additions & 6 deletions lexilla/lexers/LexBash.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class QuoteStackCls { // Class to manage quote pairs that nest
}
bool CountDown(StyleContext &sc, CmdState &cmdState) {
Current.Count--;
if (Current.Count == 1 && sc.Match(')', ')')) {
while (Current.Count > 0 && sc.chNext == Current.Down) {
Current.Count--;
sc.Forward();
}
Expand Down Expand Up @@ -380,10 +380,6 @@ class QuoteStackCls { // Class to manage quote pairs that nest
sc.ChangeState(SCE_SH_BACKTICKS);
}
}
if (current == CmdState::Body && sc.Match('(', '(') && state == SCE_SH_DEFAULT && Depth == 0) {
// optimized to avoid track nested delimiter pairs
style = QuoteStyle::Literal;
}
} else {
// scalar has no delimiter pair
if (!setParamStart.Contains(sc.ch)) {
Expand Down Expand Up @@ -939,7 +935,9 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int
continue;
}
} else if (sc.ch == QuoteStack.Current.Up) {
QuoteStack.Current.Count++;
if (QuoteStack.Current.Style != QuoteStyle::Parameter) {
QuoteStack.Current.Count++;
}
} else {
if (QuoteStack.Current.Style == QuoteStyle::String ||
QuoteStack.Current.Style == QuoteStyle::HereDoc ||
Expand Down
4 changes: 3 additions & 1 deletion lexilla/lexers/LexHTML.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,9 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int
state = SCE_HJ_DEFAULT;
} else if (isLineEnd(ch)) {
styler.ColourTo(i - 1, StateToPrint);
state = SCE_HJ_STRINGEOL;
if (chPrev != '\\' && (chPrev2 != '\\' || chPrev != '\r' || ch != '\n')) {
state = SCE_HJ_STRINGEOL;
}
}
break;
case SCE_HJ_SINGLESTRING:
Expand Down

0 comments on commit dcc7e60

Please sign in to comment.