Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package scintilla for openSUSE:Factory checked in at 2022-07-13 13:45:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/scintilla (Old) and /work/SRC/openSUSE:Factory/.scintilla.new.1523 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "scintilla" Wed Jul 13 13:45:31 2022 rev:32 rq:988810 version:5.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/scintilla/scintilla.changes 2022-06-23 10:25:01.763789474 +0200 +++ /work/SRC/openSUSE:Factory/.scintilla.new.1523/scintilla.changes 2022-07-13 13:45:56.278078629 +0200 @@ -1,0 +2,13 @@ +Wed Jul 13 02:35:24 UTC 2022 - Atri Bhattacharya <badshah...@gmail.com> + +- Update to version 5.2.4: + * Fix hiding selection when selection layer is + SC_LAYER_UNDER_TEXT. Bug #2334. + * Fix bad background colour for additional, secondary, and + inactive selections when printing. Bug #2335. + * Fix failures on GTK with non-UTF-8 text when multi-threading + due to character set conversion code that was not thread-safe. + * Fix crash when printing on Win32 in bidirectional mode with a + non-empty selection. + +------------------------------------------------------------------- Old: ---- scintilla523.tgz New: ---- scintilla524.tgz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ scintilla.spec ++++++ --- /var/tmp/diff_new_pack.ljrJ2Z/_old 2022-07-13 13:45:56.742079287 +0200 +++ /var/tmp/diff_new_pack.ljrJ2Z/_new 2022-07-13 13:45:56.750079299 +0200 @@ -17,8 +17,8 @@ %define so_ver 5.2 -%define _ver %{so_ver}.3 -%define tar_ver 523 +%define _ver %{so_ver}.4 +%define tar_ver 524 %define libname libscintilla5 Name: scintilla Version: %{_ver} ++++++ scintilla523.tgz -> scintilla524.tgz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/cocoa/Scintilla/Info.plist new/scintilla/cocoa/Scintilla/Info.plist --- old/scintilla/cocoa/Scintilla/Info.plist 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/cocoa/Scintilla/Info.plist 2022-07-09 01:45:48.000000000 +0200 @@ -15,7 +15,7 @@ <key>CFBundlePackageType</key> <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> <key>CFBundleShortVersionString</key> - <string>5.2.3</string> + <string>5.2.4</string> <key>CFBundleVersion</key> <string>$(CURRENT_PROJECT_VERSION)</string> <key>NSHumanReadableCopyright</key> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.pbxproj new/scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.pbxproj --- old/scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.pbxproj 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.pbxproj 2022-07-09 01:45:48.000000000 +0200 @@ -565,7 +565,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 5.2.3; + CURRENT_PROJECT_VERSION = 5.2.4; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -627,7 +627,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 5.2.3; + CURRENT_PROJECT_VERSION = 5.2.4; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -657,7 +657,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 5.2.3; + CURRENT_PROJECT_VERSION = 5.2.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; @@ -691,7 +691,7 @@ CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 5.2.3; + CURRENT_PROJECT_VERSION = 5.2.4; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/cppcheck.suppress new/scintilla/cppcheck.suppress --- old/scintilla/cppcheck.suppress 2022-03-31 02:47:19.000000000 +0200 +++ new/scintilla/cppcheck.suppress 2022-07-09 01:45:48.000000000 +0200 @@ -16,17 +16,14 @@ // Some non-explicit constructors are used for conversions or are private to lexers noExplicitConstructor +// Document is checking for a change by called methods and cppcheck isn't considering escape +knownConditionTrueFalse:scintilla/src/Document.cxx + // MarginView access to all bits is safe and is better defined in later versions of C++ shiftTooManyBitsSigned:scintilla/src/MarginView.cxx // DLL entry points are unused inside Scintilla -unusedFunction:scintilla\win32\ScintillaDLL.cxx - -// DLLMain is defined exactly as specified by Win32 -constParameter:scintilla\win32\ScintillaDLL.cxx - -// The styler parameter is not const as LexAccessor::operator[] is not const -constParameter:scintilla/lexlib/StyleContext.cxx +unusedFunction:scintilla/win32/ScintillaDLL.cxx // ScintillaDocument is providing an API and there are no consumers of the API inside Scintilla unusedFunction:scintilla/qt/ScintillaEdit/ScintillaDocument.cpp @@ -35,6 +32,13 @@ knownConditionTrueFalse:scintilla/qt/ScintillaEditBase/ScintillaQt.cpp knownConditionTrueFalse:scintilla/win32/ScintillaWin.cxx +// This is a weird ABI hack and shouldn't be changed +unusedStructMember:scintilla/gtk/PlatGTK.cxx + +// Have no way of testing ScintillaEdit so don't fix even simple warnings +cstyleCast:scintilla/qt/ScintillaEdit/ScintillaEdit.cpp +shadowFunction:scintilla/qt/ScintillaEdit/ScintillaEdit.cpp + // moc_ files show #error as they are not built with standard context preprocessorErrorDirective:scintilla/qt/*.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/doc/ScintillaDoc.html new/scintilla/doc/ScintillaDoc.html --- old/scintilla/doc/ScintillaDoc.html 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/doc/ScintillaDoc.html 2022-07-09 01:45:48.000000000 +0200 @@ -4708,6 +4708,10 @@ <p>If the call succeeded <code>SCI_GETBIDIRECTIONAL</code> will return the same value otherwise <code>SC_BIDIRECTIONAL_DISABLED</code> (0) is returned. </p> + <p>Opaque selection drawing (<a class="seealso" href="#SCI_SETSELECTIONLAYER">SC_LAYER_BASE</a>) + is not supported in bidirectional mode. + Use <code>SC_LAYER_UNDER_TEXT</code> or <code>SC_LAYER_OVER_TEXT</code> instead. + </p> </div> <p><b id="SCI_GRABFOCUS">SCI_GRABFOCUS</b><br /> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/doc/ScintillaDownload.html new/scintilla/doc/ScintillaDownload.html --- old/scintilla/doc/ScintillaDownload.html 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/doc/ScintillaDownload.html 2022-07-09 01:45:48.000000000 +0200 @@ -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/scintilla523.zip"> + <font size="4"> <a href="https://www.scintilla.org/scintilla524.zip"> Windows</a> - <a href="https://www.scintilla.org/scintilla523.tgz"> + <a href="https://www.scintilla.org/scintilla524.tgz"> GTK/Linux</a> </font> </td> @@ -42,7 +42,7 @@ containing very few restrictions. </p> <h3> - Release 5.2.3 + Release 5.2.4 </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/scintilla523.zip">zip format</a> (1.3M) commonly used on Windows</li> - <li><a href="https://www.scintilla.org/scintilla523.tgz">tgz format</a> (1.2M) commonly used on Linux and compatible operating systems</li> + <li><a href="https://www.scintilla.org/scintilla524.zip">zip format</a> (1.3M) commonly used on Windows</li> + <li><a href="https://www.scintilla.org/scintilla524.tgz">tgz format</a> (1.2M) 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> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/doc/ScintillaHistory.html new/scintilla/doc/ScintillaHistory.html --- old/scintilla/doc/ScintillaHistory.html 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/doc/ScintillaHistory.html 2022-07-09 01:45:48.000000000 +0200 @@ -574,6 +574,29 @@ </table> <h2>Releases</h2> <h3> + <a href="https://www.scintilla.org/scintilla524.zip">Release 5.2.4</a> + </h3> + <ul> + <li> + Released 10 July 2022. + </li> + <li> + Fix hiding selection when selection layer is SC_LAYER_UNDER_TEXT. + <a href="https://sourceforge.net/p/scintilla/bugs/2334/">Bug #2334</a>. + </li> + <li> + Fix bad background colour for additional, secondary, and inactive selections when printing. + <a href="https://sourceforge.net/p/scintilla/bugs/2335/">Bug #2335</a>. + </li> + <li> + Fix failures on GTK with non-UTF-8 text when multi-threading due to + character set conversion code that was not thread-safe. + </li> + <li> + Fix crash when printing on Win32 in bidirectional mode with a non-empty selection. + </li> + </ul> + <h3> <a href="https://www.scintilla.org/scintilla523.zip">Release 5.2.3</a> </h3> <ul> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/doc/index.html new/scintilla/doc/index.html --- old/scintilla/doc/index.html 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/doc/index.html 2022-07-09 01:45:48.000000000 +0200 @@ -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="20220522" /> + <meta name="Date.Modified" content="20220710" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style type="text/css"> #versionlist { @@ -56,8 +56,8 @@ GTK, and macOS</font> </td> <td width="40%" align="right"> - <font color="#FFCC99" size="3"> Release version 5.2.3<br /> - Site last modified May 22 2022</font> + <font color="#FFCC99" size="3"> Release version 5.2.4<br /> + Site last modified July 10 2022</font> </td> <td width="20%"> @@ -72,6 +72,7 @@ </tr> </table> <ul id="versionlist"> + <li>Version 5.2.4 fixes failures on GTK with multi-threaded layout.</li> <li>Version 5.2.3 adds 64-bit safe APIs and fixes scrollbar on GTK with Xorg.</li> <li>Version 5.2.2 on GTK, scroll horizontally with Shift + Scroll Wheel.</li> <li>Version 5.2.1 fixes leaks on GTK.</li> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/gtk/PlatGTK.cxx new/scintilla/gtk/PlatGTK.cxx --- old/scintilla/gtk/PlatGTK.cxx 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/gtk/PlatGTK.cxx 2022-07-09 01:45:48.000000000 +0200 @@ -775,12 +775,11 @@ PenColourAlpha(fore); const XYPOSITION xText = rc.left; if (PFont(font_)->fd) { - std::string utfForm; if (et == EncodingType::utf8) { LayoutSetText(layout.get(), text); } else { SetConverter(PFont(font_)->characterSet); - utfForm = UTF8FromIconv(conv, text); + std::string utfForm = UTF8FromIconv(conv, text); if (utfForm.empty()) { // iconv failed so treat as Latin1 utfForm = UTF8FromLatin1(text); } @@ -897,14 +896,34 @@ PLATFORM_ASSERT(static_cast<size_t>(i) == text.length()); } else { int positionsCalculated = 0; + const char *charSetID = CharacterSetID(PFont(font_)->characterSet); + std::string utfForm; + { + gsize bytesRead = 0; + gsize bytesWritten = 0; + GError *error = nullptr; + UniqueStr textInUTF8(g_convert(text.data(), text.length(), + "UTF-8", charSetID, + &bytesRead, + &bytesWritten, + &error)); + if ((bytesWritten > 0) && (bytesRead == text.length()) && !error) { + // Extra allocation here but avoiding it makes code more complex + utfForm.assign(textInUTF8.get(), bytesWritten); + } + if (error) { +#ifdef DEBUG + fprintf(stderr, "MeasureWidths: %s.\n", error->message); +#endif + g_error_free(error); + } + } if (et == EncodingType::dbcs) { - SetConverter(PFont(font_)->characterSet); - std::string utfForm = UTF8FromIconv(conv, text); if (!utfForm.empty()) { // Convert to UTF-8 so can ask Pango for widths, then // Loop through UTF-8 and DBCS forms, taking account of different // character byte lengths. - Converter convMeasure("UCS-2", CharacterSetID(characterSet), false); + Converter convMeasure("UCS-2", charSetID, false); int i = 0; ClusterIterator iti(layoutMeasure.get(), utfForm); int clusterStart = iti.curIndex; @@ -916,7 +935,7 @@ while (!iti.finished) { iti.Next(); const int clusterEnd = iti.curIndex; - const int places = g_utf8_strlen(utfForm.c_str() + clusterStart, clusterEnd - clusterStart); + const int places = g_utf8_strlen(utfForm.data() + clusterStart, clusterEnd - clusterStart); int place = 1; while (clusterStart < clusterEnd) { size_t lenChar = MultiByteLenFromIconv(convMeasure, text.data()+i, text.length()-i); @@ -934,12 +953,13 @@ if (positionsCalculated < 1) { const size_t lenPositions = text.length(); // Either 8-bit or DBCS conversion failed so treat as 8-bit. - SetConverter(PFont(font_)->characterSet); const bool rtlCheck = PFont(font_)->characterSet == CharacterSet::Hebrew || PFont(font_)->characterSet == CharacterSet::Arabic; - std::string utfForm = UTF8FromIconv(conv, text); if (utfForm.empty()) { utfForm = UTF8FromLatin1(text); +#ifdef DEBUG + fprintf(stderr, "MeasureWidths: Fall back to Latin1 [%s]\n", utfForm.c_str()); +#endif } size_t i = 0; // Each 8-bit input character may take 1 or 2 bytes in UTF-8 @@ -954,9 +974,13 @@ while (!iti.finished) { iti.Next(); const int clusterEnd = iti.curIndex; - const int ligatureLength = g_utf8_strlen(utfForm.c_str() + clusterStart, clusterEnd - clusterStart); - if (rtlCheck && ((clusterEnd <= clusterStart) || (ligatureLength == 0) || (ligatureLength > 3))) { + const int ligatureLength = g_utf8_strlen(utfForm.data() + clusterStart, clusterEnd - clusterStart); + if (((i + ligatureLength) > lenPositions) || + (rtlCheck && ((clusterEnd <= clusterStart) || (ligatureLength == 0) || (ligatureLength > 3)))) { // Something has gone wrong: exit quickly but pretend all the characters are equally spaced: +#ifdef DEBUG + fprintf(stderr, "MeasureWidths: result too long.\n"); +#endif EquallySpaced(layoutMeasure.get(), positions, lenPositions); return; } @@ -983,13 +1007,12 @@ XYPOSITION SurfaceImpl::WidthText(const Font *font_, std::string_view text) { if (PFont(font_)->fd) { - std::string utfForm; pango_layout_set_font_description(layout.get(), PFont(font_)->fd.get()); if (et == EncodingType::utf8) { LayoutSetText(layout.get(), text); } else { SetConverter(PFont(font_)->characterSet); - utfForm = UTF8FromIconv(conv, text); + std::string utfForm = UTF8FromIconv(conv, text); if (utfForm.empty()) { // iconv failed so treat as Latin1 utfForm = UTF8FromLatin1(text); } @@ -1365,7 +1388,7 @@ WindowID frame; WindowID list; WindowID scroller; - void *pixhash; + GHashTable *pixhash; GtkCellRenderer *pixbuf_renderer; GtkCellRenderer *renderer; RGBAImageSet images; @@ -1392,8 +1415,8 @@ ListBoxX&operator=(ListBoxX&&) = delete; ~ListBoxX() noexcept override { if (pixhash) { - g_hash_table_foreach((GHashTable *) pixhash, list_image_free, nullptr); - g_hash_table_destroy((GHashTable *) pixhash); + g_hash_table_foreach(pixhash, list_image_free, nullptr); + g_hash_table_destroy(pixhash); } if (widCached) { gtk_widget_destroy(GTK_WIDGET(widCached)); @@ -1846,7 +1869,7 @@ void ListBoxX::Append(char *s, int type) { ListImage *list_image = nullptr; if ((type >= 0) && pixhash) { - list_image = static_cast<ListImage *>(g_hash_table_lookup((GHashTable *) pixhash, + list_image = static_cast<ListImage *>(g_hash_table_lookup(pixhash, GINT_TO_POINTER(type))); } GtkTreeIter iter {}; @@ -2007,7 +2030,7 @@ if (!pixhash) { pixhash = g_hash_table_new(g_direct_hash, g_direct_equal); } - ListImage *list_image = static_cast<ListImage *>(g_hash_table_lookup((GHashTable *) pixhash, + ListImage *list_image = static_cast<ListImage *>(g_hash_table_lookup(pixhash, GINT_TO_POINTER(type))); if (list_image) { // Drop icon already registered @@ -2018,7 +2041,7 @@ } else { list_image = g_new0(ListImage, 1); list_image->rgba_data = observe; - g_hash_table_insert((GHashTable *) pixhash, GINT_TO_POINTER(type), + g_hash_table_insert(pixhash, GINT_TO_POINTER(type), (gpointer) list_image); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/gtk/ScintillaGTK.cxx new/scintilla/gtk/ScintillaGTK.cxx --- old/scintilla/gtk/ScintillaGTK.cxx 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/gtk/ScintillaGTK.cxx 2022-07-09 01:45:48.000000000 +0200 @@ -3231,9 +3231,9 @@ static void scintilla_class_init(ScintillaClass *klass) { try { - OBJECT_CLASS *object_class = (OBJECT_CLASS *) klass; - GtkWidgetClass *widget_class = (GtkWidgetClass *) klass; - GtkContainerClass *container_class = (GtkContainerClass *) klass; + OBJECT_CLASS *object_class = reinterpret_cast<OBJECT_CLASS *>(klass); + GtkWidgetClass *widget_class = reinterpret_cast<GtkWidgetClass *>(klass); + GtkContainerClass *container_class = reinterpret_cast<GtkContainerClass *>(klass); const GSignalFlags sigflags = static_cast<GSignalFlags>(G_SIGNAL_ACTION | G_SIGNAL_RUN_LAST); scintilla_signals[COMMAND_SIGNAL] = g_signal_new( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/gtk/ScintillaGTKAccessible.cxx new/scintilla/gtk/ScintillaGTKAccessible.cxx --- old/scintilla/gtk/ScintillaGTKAccessible.cxx 2022-03-31 02:47:19.000000000 +0200 +++ new/scintilla/gtk/ScintillaGTKAccessible.cxx 2022-07-09 01:45:48.000000000 +0200 @@ -188,7 +188,7 @@ // like TargetAsUTF8, but avoids a double conversion if (sci->IsUnicodeMode() || ! *(charSetBuffer = sci->CharacterSetID())) { int len = endByte - startByte; - utf8Text = (char *) g_malloc(len + 1); + utf8Text = static_cast<gchar *>(g_malloc(len + 1)); sci->pdoc->GetCharRange(utf8Text, startByte, len); utf8Text[len] = '\0'; } else { @@ -196,7 +196,7 @@ std::string s = sci->RangeText(startByte, endByte); std::string tmputf = ConvertText(&s[0], s.length(), "UTF-8", charSetBuffer, false); size_t len = tmputf.length(); - utf8Text = (char *) g_malloc(len + 1); + utf8Text = static_cast<gchar *>(g_malloc(len + 1)); memcpy(utf8Text, tmputf.c_str(), len); utf8Text[len] = '\0'; } @@ -1085,11 +1085,11 @@ static AtkObject *scintilla_object_accessible_new(GType parent_type, GObject *obj) { g_return_val_if_fail(SCINTILLA_IS_OBJECT(obj), nullptr); - AtkObject *accessible = (AtkObject *) g_object_new(scintilla_object_accessible_get_type(parent_type), + AtkObject *accessible = static_cast<AtkObject *>(g_object_new(scintilla_object_accessible_get_type(parent_type), #if HAVE_WIDGET_SET_UNSET "widget", obj, #endif - nullptr); + nullptr)); atk_object_initialize(accessible, obj); return accessible; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/qt/ScintillaEdit/ScintillaEdit.pro new/scintilla/qt/ScintillaEdit/ScintillaEdit.pro --- old/scintilla/qt/ScintillaEdit/ScintillaEdit.pro 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/qt/ScintillaEdit/ScintillaEdit.pro 2022-07-09 01:45:48.000000000 +0200 @@ -13,7 +13,7 @@ CONFIG += lib_bundle CONFIG += c++1z -VERSION = 5.2.3 +VERSION = 5.2.4 SOURCES += \ ScintillaEdit.cpp \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/qt/ScintillaEdit/WidgetGen.py new/scintilla/qt/ScintillaEdit/WidgetGen.py --- old/scintilla/qt/ScintillaEdit/WidgetGen.py 2022-03-31 02:47:19.000000000 +0200 +++ new/scintilla/qt/ScintillaEdit/WidgetGen.py 2022-07-09 01:45:48.000000000 +0200 @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# WidgetGen.py - regenerate the ScintillaWidgetCpp.cpp and ScintillaWidgetCpp.h files +# WidgetGen.py - regenerate the ScintillaEdit.cpp and ScintillaEdit.h files # Check that API includes all gtkscintilla2 functions import sys @@ -92,20 +92,6 @@ ret = ret + p2Type + " " + normalisedName(v["Param2Name"], options) return ret -def printPyFile(f, options): - out = [] - for name in f.order: - v = f.features[name] - if v["Category"] != "Deprecated": - feat = v["FeatureType"] - if feat in ["val"]: - out.append(name + "=" + v["Value"]) - if feat in ["evt"]: - out.append("SCN_" + name.upper() + "=" + v["Value"]) - if feat in ["fun"]: - out.append("SCI_" + name.upper() + "=" + v["Value"]) - return out - def printHFile(f, options): out = [] for name in f.order: @@ -202,7 +188,7 @@ def usage(): print("WidgetGen.py [-c|--clean][-h|--help][-u|--underscore-names]") print("") - print("Generate full APIs for ScintillaEdit class and ScintillaConstants.py.") + print("Generate full APIs for ScintillaEdit class.") print("") print("options:") print("") @@ -242,9 +228,6 @@ "/* ", True, printCPPFile(f, options)) GenerateFile("ScintillaEdit.h.template", "ScintillaEdit.h", "/* ", True, printHFile(f, options)) - GenerateFile("../ScintillaEditPy/ScintillaConstants.py.template", - "../ScintillaEditPy/ScintillaConstants.py", - "# ", True, printPyFile(f, options)) if checkGTK: names = set(methodNames(f)) #~ print("\n".join(names)) @@ -259,7 +242,7 @@ raise if cleanGenerated: - for file in ["ScintillaEdit.cpp", "ScintillaEdit.h", "../ScintillaEditPy/ScintillaConstants.py"]: + for file in ["ScintillaEdit.cpp", "ScintillaEdit.h"]: try: os.remove(file) except OSError: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/qt/ScintillaEditBase/ScintillaEditBase.pro new/scintilla/qt/ScintillaEditBase/ScintillaEditBase.pro --- old/scintilla/qt/ScintillaEditBase/ScintillaEditBase.pro 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/qt/ScintillaEditBase/ScintillaEditBase.pro 2022-07-09 01:45:48.000000000 +0200 @@ -12,7 +12,7 @@ CONFIG += lib_bundle CONFIG += c++1z -VERSION = 5.2.3 +VERSION = 5.2.4 SOURCES += \ PlatQt.cpp \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/qt/ScintillaEditBase/ScintillaQt.cpp new/scintilla/qt/ScintillaEditBase/ScintillaQt.cpp --- old/scintilla/qt/ScintillaEditBase/ScintillaQt.cpp 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/qt/ScintillaEditBase/ScintillaQt.cpp 2022-07-09 01:45:48.000000000 +0200 @@ -53,8 +53,8 @@ void ScintillaQt::execCommand(QAction *action) { - int command = action->data().toInt(); - Command(command); + const int commandNum = action->data().toInt(); + Command(commandNum); } #if defined(Q_OS_WIN) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/src/EditView.cxx new/scintilla/src/EditView.cxx --- old/scintilla/src/EditView.cxx 2022-05-21 08:51:09.000000000 +0200 +++ new/scintilla/src/EditView.cxx 2022-07-09 01:45:48.000000000 +0200 @@ -934,7 +934,7 @@ namespace { -constexpr ColourRGBA bugColour = ColourRGBA(0xff, 0, 0xff, 0xf0); +constexpr ColourRGBA bugColour = ColourRGBA(0xff, 0, 0xfe, 0xf0); // Selection background colours are always defined, the value_or is to show if bug @@ -1974,18 +1974,20 @@ model, vsDraw, model.sel.RangeType(r)); const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; if (model.BidirectionalEnabled()) { - const int selectionStart = static_cast<int>(portion.start.Position() - posLineStart - lineRange.start); - const int selectionEnd = static_cast<int>(portion.end.Position() - posLineStart - lineRange.start); + const Sci::Position selectionStart = portion.start.Position() - posLineStart - lineRange.start; + const Sci::Position selectionEnd = portion.end.Position() - posLineStart - lineRange.start; const ScreenLine screenLine(ll, subLine, vsDraw, rcLine.right, tabWidthMinimumPixels); std::unique_ptr<IScreenLineLayout> slLayout = surface->Layout(&screenLine); - const std::vector<Interval> intervals = slLayout->FindRangeIntervals(selectionStart, selectionEnd); - for (const Interval &interval : intervals) { - const XYPOSITION rcRight = interval.right + xStart; - const XYPOSITION rcLeft = interval.left + xStart; - const PRectangle rcSelection(rcLeft, rcLine.top, rcRight, rcLine.bottom); - surface->FillRectangleAligned(rcSelection, selectionBack); + if (slLayout) { + const std::vector<Interval> intervals = slLayout->FindRangeIntervals(selectionStart, selectionEnd); + for (const Interval &interval : intervals) { + const XYPOSITION rcRight = interval.right + xStart; + const XYPOSITION rcLeft = interval.left + xStart; + const PRectangle rcSelection(rcLeft, rcLine.top, rcRight, rcLine.bottom); + surface->FillRectangleAligned(rcSelection, selectionBack); + } } if (portion.end.VirtualSpace()) { @@ -2355,7 +2357,9 @@ } if (FlagSet(phase, DrawPhase::text)) { - DrawTranslucentSelection(surface, model, vsDraw, ll, line, rcLine, subLine, lineRange, xStart, tabWidthMinimumPixels, Layer::UnderText); + if (!hideSelection) { + DrawTranslucentSelection(surface, model, vsDraw, ll, line, rcLine, subLine, lineRange, xStart, tabWidthMinimumPixels, Layer::UnderText); + } DrawTranslucentLineState(surface, model, vsDraw, ll, line, rcLine, subLine, Layer::UnderText); DrawForeground(surface, model, vsDraw, ll, lineVisible, rcLine, lineRange, posLineStart, xStart, subLine, background); @@ -2694,8 +2698,12 @@ // Don't show the selection when printing vsPrint.elementColours.clear(); vsPrint.elementBaseColours.clear(); - // Transparent: - vsPrint.elementBaseColours[Element::SelectionBack] = ColourRGBA(0xc0, 0xc0, 0xc0, 0x0); + // Set all selection background colours to be transparent. + constexpr ColourRGBA transparent(0xc0, 0xc0, 0xc0, 0x0); + vsPrint.elementBaseColours[Element::SelectionBack] = transparent; + vsPrint.elementBaseColours[Element::SelectionAdditionalBack] = transparent; + vsPrint.elementBaseColours[Element::SelectionSecondaryBack] = transparent; + vsPrint.elementBaseColours[Element::SelectionInactiveBack] = transparent; vsPrint.caretLine.alwaysShow = false; // Don't highlight matching braces using indicators vsPrint.braceHighlightIndicatorSet = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/version.txt new/scintilla/version.txt --- old/scintilla/version.txt 2022-05-21 08:51:10.000000000 +0200 +++ new/scintilla/version.txt 2022-07-09 01:45:48.000000000 +0200 @@ -1 +1 @@ -523 +524 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scintilla/win32/ScintRes.rc new/scintilla/win32/ScintRes.rc --- old/scintilla/win32/ScintRes.rc 2022-05-21 08:51:10.000000000 +0200 +++ new/scintilla/win32/ScintRes.rc 2022-07-09 01:45:48.000000000 +0200 @@ -4,8 +4,8 @@ #include <windows.h> -#define VERSION_SCINTILLA "5.2.3" -#define VERSION_WORDS 5, 2, 3, 0 +#define VERSION_SCINTILLA "5.2.4" +#define VERSION_WORDS 5, 2, 4, 0 VS_VERSION_INFO VERSIONINFO FILEVERSION VERSION_WORDS