Update to scintilla 5.4.3 (from 5.4.1) & Lexilla 5.3.1
Sintilla [Release 5.4.3](https://www.scintilla.org/scintilla543.zip) * Release 5.4.3: Released 9 March 2024 1. Fix redo failure introduced with 5.4.2. [Bug #2432](https://sourceforge.net/p/scintilla/bugs/2432/). 2. Add SC_AUTOCOMPLETE_SELECT_FIRST_ITEM option to always selects the first item in the autocompletion list. [Bug #2403](https://sourceforge.net/p/scintilla/bugs/2403/). * Release 5.4.2: Released 5 March 2024 1. Significantly reduce memory used for undo actions, often to a half or quarter of previous versions. Feature #1458. 2. Add APIs for saving and restoring undo history. 3. For GTK, when laying out text, detect runs with both left-to-right and right-to-left ranges and divide into an ASCII prefix and more complex suffix. Lay out the ASCII prefix in the standard manner but, for the suffix, measure the whole width and spread that over the suffix bytes. This produces more usable results where the caret moves over the ASCII prefix correctly and over the suffix reasonably but not accurately. 4. For ScintillaEdit on Qt, fix reference from ScintillaDocument to Document to match change in 5.4.1 using IDocumentEditable for SCI_GETDOCPOINTER and SCI_SETDOCPOINTER. 5. For Direct2D on Win32, use the multi-threaded option to avoid crashes when Scintilla instances created on different threads. There may be more problems with this scenario so it should be avoided. Bug #2420. 6. For Win32, ensure keyboard-initiated context menu appears in multi-screen situations. Lexilla [Release 5.3.1](https://www.scintilla.org/lexilla531.zip) * Release 5.3.1: Released 5 March 2024 1. Assembler: After comments, treat \r\n line ends the same as \n. This makes testing easier. 2. Bash: Fix folding when line changed to/from comment and previous line is comment. Issue #224. 3. Batch: Fix handling ':' next to keywords. Issue #222. 4. JavaScript: in cpp lexer, add lexer.cpp.backquoted.strings=2 mode to treat ` back-quoted strings as template literals which allow embedded ${expressions}. Issue #94. 5. Python: fix lexing of rb'' and rf'' strings. Issue #223, Pull request #227. 6. Ruby: fix lexing of methods on numeric literals like '3.times' so the '.' and method name do not appear in numeric style. Issue #225. Close #14834pull/14848/head
parent
0f3ae2e3d5
commit
1c32e2906f
Binary file not shown.
|
@ -15,7 +15,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>5.4.2</string>
|
||||
<string>5.4.3</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
|
|
@ -582,7 +582,7 @@
|
|||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 5.4.2;
|
||||
CURRENT_PROJECT_VERSION = 5.4.3;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
|
@ -647,7 +647,7 @@
|
|||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 5.4.2;
|
||||
CURRENT_PROJECT_VERSION = 5.4.3;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
|
@ -680,7 +680,7 @@
|
|||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 5.4.2;
|
||||
CURRENT_PROJECT_VERSION = 5.4.3;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
|
@ -715,7 +715,7 @@
|
|||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 5.4.2;
|
||||
CURRENT_PROJECT_VERSION = 5.4.3;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
|
|
|
@ -6420,6 +6420,18 @@ struct Sci_TextToFindFull {
|
|||
This also avoids a header rectangle above the list.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="left"><code>SC_AUTOCOMPLETE_SELECT_FIRST_ITEM</code></td>
|
||||
|
||||
<td align="center">2</td>
|
||||
|
||||
<td>Always select the first item from the autocompletion list regardless of the value
|
||||
entered in the editor. Useful when the autocompletion logic of the application
|
||||
sorts autocompletion entries so that the best match is always at the top of the
|
||||
list. Without this option, Scintilla selects the item from the autocompletion
|
||||
list matching the value entered in the editor.</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -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/scintilla542.zip">
|
||||
<font size="4"> <a href="https://www.scintilla.org/scintilla543.zip">
|
||||
Windows</a>
|
||||
<a href="https://www.scintilla.org/scintilla542.tgz">
|
||||
<a href="https://www.scintilla.org/scintilla543.tgz">
|
||||
GTK/Linux</a>
|
||||
</font>
|
||||
</td>
|
||||
|
@ -42,7 +42,7 @@
|
|||
containing very few restrictions.
|
||||
</p>
|
||||
<h3>
|
||||
Release 5.4.2
|
||||
Release 5.4.3
|
||||
</h3>
|
||||
<h4>
|
||||
Source Code
|
||||
|
@ -50,8 +50,8 @@
|
|||
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="https://www.scintilla.org/scintilla542.zip">zip format</a> (1.8M) commonly used on Windows</li>
|
||||
<li><a href="https://www.scintilla.org/scintilla542.tgz">tgz format</a> (1.7M) commonly used on Linux and compatible operating systems</li>
|
||||
<li><a href="https://www.scintilla.org/scintilla543.zip">zip format</a> (1.8M) commonly used on Windows</li>
|
||||
<li><a href="https://www.scintilla.org/scintilla543.tgz">tgz format</a> (1.7M) 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>
|
||||
|
|
|
@ -583,6 +583,23 @@
|
|||
</tr>
|
||||
</table>
|
||||
<h2>Releases</h2>
|
||||
<h3>
|
||||
<a href="https://www.scintilla.org/scintilla543.zip">Release 5.4.3</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Released 9 March 2024.
|
||||
</li>
|
||||
<li>
|
||||
Fix redo failure introduced with 5.4.2.
|
||||
<a href="https://sourceforge.net/p/scintilla/bugs/2432/">Bug #2432</a>.
|
||||
</li>
|
||||
<li>
|
||||
Add SC_AUTOCOMPLETE_SELECT_FIRST_ITEM option to
|
||||
always selects the first item in the autocompletion list.
|
||||
<a href="https://sourceforge.net/p/scintilla/bugs/2403/">Bug #2403</a>.
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="https://www.scintilla.org/scintilla542.zip">Release 5.4.2</a>
|
||||
</h3>
|
||||
|
@ -12833,7 +12850,7 @@
|
|||
Pascal lexer handles comments more correctly.
|
||||
</li>
|
||||
<li>
|
||||
C/C++/Java/JavaScipt lexer has a state for line doc comments.
|
||||
C/C++/Java/JavaScript lexer has a state for line doc comments.
|
||||
</li>
|
||||
<li>
|
||||
Error output lexer understands Sun CC messages.
|
||||
|
|
|
@ -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="20240305" />
|
||||
<meta name="Date.Modified" content="20240309" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type="text/css">
|
||||
.logo {
|
||||
|
@ -60,8 +60,8 @@
|
|||
GTK, and macOS</font>
|
||||
</td>
|
||||
<td width="40%" align="right">
|
||||
<font color="#FFCC99" size="3"> Release version 5.4.2<br />
|
||||
Site last modified March 5 2024</font>
|
||||
<font color="#FFCC99" size="3"> Release version 5.4.3<br />
|
||||
Site last modified March 9 2024</font>
|
||||
</td>
|
||||
<td width="20%">
|
||||
|
||||
|
@ -76,11 +76,11 @@
|
|||
</tr>
|
||||
</table>
|
||||
<ul id="versionlist">
|
||||
<li>Version 5.4.3 fixes a redo bug.</li>
|
||||
<li>Version 5.4.2 can save and restore undo history.</li>
|
||||
<li>Version 5.4.1 adds IDocumentEditable interface to allow efficient interaction with document objects.</li>
|
||||
<li>Version 5.4.0 fixes crashes on macOS 12 and older when built with Xcode 15.0.</li>
|
||||
<li>Version 5.3.8 fixes excesssive memory use when deleting contiguous ranges backwards and is compatible with new macOS 14.</li>
|
||||
<li>Version 5.3.7 fixes platform-specific issues on GTK, Qt, and Win32.</li>
|
||||
</ul>
|
||||
<ul id="menu">
|
||||
<li id="remote1"><a href="https://www.scintilla.org/SciTEImage.html">Screenshot</a></li>
|
||||
|
|
|
@ -446,6 +446,7 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP
|
|||
#define SCI_AUTOCGETAUTOHIDE 2119
|
||||
#define SC_AUTOCOMPLETE_NORMAL 0
|
||||
#define SC_AUTOCOMPLETE_FIXED_SIZE 1
|
||||
#define SC_AUTOCOMPLETE_SELECT_FIRST_ITEM 2
|
||||
#define SCI_AUTOCSETOPTIONS 2638
|
||||
#define SCI_AUTOCGETOPTIONS 2639
|
||||
#define SCI_AUTOCSETDROPRESTOFWORD 2270
|
||||
|
|
|
@ -1100,6 +1100,8 @@ enu AutoCompleteOption=SC_AUTOCOMPLETE_
|
|||
val SC_AUTOCOMPLETE_NORMAL=0
|
||||
# Win32 specific:
|
||||
val SC_AUTOCOMPLETE_FIXED_SIZE=1
|
||||
# Always select the first item in the autocompletion list:
|
||||
val SC_AUTOCOMPLETE_SELECT_FIRST_ITEM=2
|
||||
|
||||
# Set autocompletion options.
|
||||
set void AutoCSetOptions=2638(AutoCompleteOption options,)
|
||||
|
|
|
@ -250,6 +250,7 @@ enum class IndicFlag {
|
|||
enum class AutoCompleteOption {
|
||||
Normal = 0,
|
||||
FixedSize = 1,
|
||||
SelectFirstItem = 2,
|
||||
};
|
||||
|
||||
enum class IndentView {
|
||||
|
|
|
@ -13,7 +13,7 @@ TEMPLATE = lib
|
|||
CONFIG += lib_bundle
|
||||
CONFIG += c++1z
|
||||
|
||||
VERSION = 5.4.2
|
||||
VERSION = 5.4.3
|
||||
|
||||
SOURCES += \
|
||||
ScintillaEdit.cpp \
|
||||
|
|
|
@ -13,7 +13,7 @@ TEMPLATE = lib
|
|||
CONFIG += lib_bundle
|
||||
CONFIG += c++1z
|
||||
|
||||
VERSION = 5.4.2
|
||||
VERSION = 5.4.3
|
||||
|
||||
SOURCES += \
|
||||
PlatQt.cpp \
|
||||
|
|
|
@ -4050,12 +4050,17 @@ constexpr int maskCategory = 0x1F;
|
|||
// possibly for 0..0xff for most Western European text or 0..0xfff for most
|
||||
// alphabetic languages.
|
||||
|
||||
CharacterCategory CategoriseCharacter(int character) {
|
||||
CharacterCategory CategoriseCharacter(int character) noexcept {
|
||||
if (character < 0 || character > maxUnicode)
|
||||
return ccCn;
|
||||
const int baseValue = character * (maskCategory+1) + maskCategory;
|
||||
try {
|
||||
// lower_bound will never throw with these args but its not marked noexcept so add catch to pretend.
|
||||
const int *placeAfter = std::lower_bound(catRanges, std::end(catRanges), baseValue);
|
||||
return static_cast<CharacterCategory>(*(placeAfter - 1) & maskCategory);
|
||||
} catch (...) {
|
||||
return ccCn;
|
||||
}
|
||||
}
|
||||
|
||||
// Implementation of character sets recommended for identifiers in Unicode Standard Annex #31.
|
||||
|
@ -4158,7 +4163,7 @@ bool OmitXidContinue(int character) noexcept {
|
|||
|
||||
// UAX #31 defines ID_Start as
|
||||
// [[:L:][:Nl:][:Other_ID_Start:]--[:Pattern_Syntax:]--[:Pattern_White_Space:]]
|
||||
bool IsIdStart(int character) {
|
||||
bool IsIdStart(int character) noexcept {
|
||||
if (IsIdPattern(character)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -4173,7 +4178,7 @@ bool IsIdStart(int character) {
|
|||
|
||||
// UAX #31 defines ID_Continue as
|
||||
// [[:ID_Start:][:Mn:][:Mc:][:Nd:][:Pc:][:Other_ID_Continue:]--[:Pattern_Syntax:]--[:Pattern_White_Space:]]
|
||||
bool IsIdContinue(int character) {
|
||||
bool IsIdContinue(int character) noexcept {
|
||||
if (IsIdPattern(character)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -4187,7 +4192,7 @@ bool IsIdContinue(int character) {
|
|||
}
|
||||
|
||||
// XID_Start is ID_Start modified for Normalization Form KC in UAX #31
|
||||
bool IsXidStart(int character) {
|
||||
bool IsXidStart(int character) noexcept {
|
||||
if (OmitXidStart(character)) {
|
||||
return false;
|
||||
} else {
|
||||
|
@ -4196,7 +4201,7 @@ bool IsXidStart(int character) {
|
|||
}
|
||||
|
||||
// XID_Continue is ID_Continue modified for Normalization Form KC in UAX #31
|
||||
bool IsXidContinue(int character) {
|
||||
bool IsXidContinue(int character) noexcept {
|
||||
if (OmitXidContinue(character)) {
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -22,20 +22,20 @@ enum CharacterCategory {
|
|||
ccCc, ccCf, ccCs, ccCo, ccCn
|
||||
};
|
||||
|
||||
CharacterCategory CategoriseCharacter(int character);
|
||||
CharacterCategory CategoriseCharacter(int character) noexcept;
|
||||
|
||||
// Common definitions of allowable characters in identifiers from UAX #31.
|
||||
bool IsIdStart(int character);
|
||||
bool IsIdContinue(int character);
|
||||
bool IsXidStart(int character);
|
||||
bool IsXidContinue(int character);
|
||||
bool IsIdStart(int character) noexcept;
|
||||
bool IsIdContinue(int character) noexcept;
|
||||
bool IsXidStart(int character) noexcept;
|
||||
bool IsXidContinue(int character) noexcept;
|
||||
|
||||
class CharacterCategoryMap {
|
||||
private:
|
||||
std::vector<unsigned char> dense;
|
||||
public:
|
||||
CharacterCategoryMap();
|
||||
CharacterCategory CategoryFor(int character) const {
|
||||
CharacterCategory CategoryFor(int character) const noexcept {
|
||||
if (static_cast<size_t>(character) < dense.size()) {
|
||||
return static_cast<CharacterCategory>(dense[character]);
|
||||
} else {
|
||||
|
|
|
@ -353,6 +353,8 @@ void ScintillaBase::AutoCompleteMove(int delta) {
|
|||
}
|
||||
|
||||
void ScintillaBase::AutoCompleteMoveToCurrentWord() {
|
||||
if (FlagSet(ac.options, AutoCompleteOption::SelectFirstItem))
|
||||
return;
|
||||
std::string wordCurrent = RangeText(ac.posStart - ac.startLen, sel.MainCaret());
|
||||
ac.Select(wordCurrent.c_str());
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ void VectorTruncate(std::vector<T> &v, size_t length) noexcept {
|
|||
|
||||
constexpr size_t byteMask = UINT8_MAX;
|
||||
constexpr size_t byteBits = 8;
|
||||
constexpr size_t maxElementSize = 8;
|
||||
|
||||
size_t ReadValue(const uint8_t *bytes, size_t length) noexcept {
|
||||
size_t value = 0;
|
||||
|
@ -75,13 +74,13 @@ intptr_t ScaledVector::SignedValueAt(size_t index) const noexcept {
|
|||
|
||||
constexpr SizeMax ElementForValue(size_t value) noexcept {
|
||||
size_t maxN = byteMask;
|
||||
for (size_t i = 1; i < maxElementSize; i++) {
|
||||
if (value <= maxN) {
|
||||
return { i, maxN };
|
||||
}
|
||||
size_t i = 1;
|
||||
while (value > byteMask) {
|
||||
i++;
|
||||
value >>= byteBits;
|
||||
maxN = (maxN << byteBits) + byteMask;
|
||||
}
|
||||
return { 1, byteMask };
|
||||
return { i, maxN };
|
||||
}
|
||||
|
||||
void ScaledVector::SetValueAt(size_t index, size_t value) {
|
||||
|
@ -316,6 +315,8 @@ const char *UndoHistory::AppendAction(ActionType at, Sci::Position position, con
|
|||
const char *dataNew = lengthData ? scraps->Push(data, lengthData) : nullptr;
|
||||
if (currentAction >= actions.SSize()) {
|
||||
actions.PushBack();
|
||||
} else {
|
||||
actions.Truncate(currentAction+1);
|
||||
}
|
||||
actions.Create(currentAction, at, position, lengthData, mayCoalesce);
|
||||
currentAction++;
|
||||
|
|
|
@ -3129,6 +3129,28 @@ class TestAutoComplete(unittest.TestCase):
|
|||
|
||||
self.assertEqual(self.ed.AutoCActive(), 0)
|
||||
|
||||
def testAutoSelectFirstItem(self):
|
||||
self.assertEqual(self.ed.AutoCActive(), 0)
|
||||
|
||||
self.ed.AutoCSetOrder(self.ed.SC_ORDER_CUSTOM)
|
||||
|
||||
# without SC_AUTOCOMPLETE_SELECT_FIRST_ITEM option
|
||||
self.ed.SetSel(3, 3)
|
||||
self.ed.AutoCShow(3, b"aaa1 bbb1 xxx1")
|
||||
# automatically selects the item with the entered prefix xxx
|
||||
self.ed.AutoCComplete()
|
||||
self.assertEqual(self.ed.Contents(), b"xxx1\n")
|
||||
|
||||
# with SC_AUTOCOMPLETE_SELECT_FIRST_ITEM option
|
||||
self.ed.AutoCSetOptions(2, 0)
|
||||
self.ed.SetSel(3, 3)
|
||||
self.ed.AutoCShow(3, b"aaa1 bbb1 xxx1")
|
||||
# selects the first item regardless of the entered prefix and replaces the entered xxx
|
||||
self.ed.AutoCComplete()
|
||||
self.assertEqual(self.ed.Contents(), b"aaa11\n")
|
||||
|
||||
self.assertEqual(self.ed.AutoCActive(), 0)
|
||||
|
||||
def testAutoCustomSort(self):
|
||||
# Checks bug #2294 where SC_ORDER_CUSTOM with an empty list asserts
|
||||
# https://sourceforge.net/p/scintilla/bugs/2294/
|
||||
|
|
|
@ -397,6 +397,32 @@ TEST_CASE("UndoHistory") {
|
|||
REQUIRE(!uh.IsSavePoint());
|
||||
}
|
||||
|
||||
SECTION("EnsureTruncationAfterUndo") {
|
||||
|
||||
REQUIRE(uh.Actions() == 0);
|
||||
bool startSequence = false;
|
||||
uh.AppendAction(ActionType::insert, 0, "ab", 2, startSequence, true);
|
||||
REQUIRE(uh.Actions() == 1);
|
||||
uh.AppendAction(ActionType::insert, 2, "cd", 2, startSequence, true);
|
||||
REQUIRE(uh.Actions() == 2);
|
||||
REQUIRE(uh.CanUndo());
|
||||
REQUIRE(!uh.CanRedo());
|
||||
|
||||
// Undoing
|
||||
const int steps = uh.StartUndo();
|
||||
REQUIRE(steps == 2);
|
||||
uh.GetUndoStep();
|
||||
uh.CompletedUndoStep();
|
||||
REQUIRE(uh.Actions() == 2); // Not truncated until forward action
|
||||
uh.GetUndoStep();
|
||||
uh.CompletedUndoStep();
|
||||
REQUIRE(uh.Actions() == 2);
|
||||
|
||||
// Perform action which should truncate history
|
||||
uh.AppendAction(ActionType::insert, 0, "12", 2, startSequence, true);
|
||||
REQUIRE(uh.Actions() == 1);
|
||||
}
|
||||
|
||||
SECTION("Coalesce") {
|
||||
|
||||
bool startSequence = false;
|
||||
|
|
|
@ -1 +1 @@
|
|||
542
|
||||
543
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include <windows.h>
|
||||
|
||||
#define VERSION_SCINTILLA "5.4.2"
|
||||
#define VERSION_WORDS 5, 4, 2, 0
|
||||
#define VERSION_SCINTILLA "5.4.3"
|
||||
#define VERSION_WORDS 5, 4, 3, 0
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VERSION_WORDS
|
||||
|
|
Loading…
Reference in New Issue