Notable changes since 5.1.5 - multithreaded layouting and line wrapping. Neil says this can lead to dramatic improvements. Disabled by default, see SCI_SETLAYOUTTHREADS (i.e. we don't use it yet) - New APIs to support 64-bit document positions on Win32: SCI_GETSTYLEDTEXTFULL, SCI_GETTEXTRANGEFULL, SCI_FINDTEXTFULL, and SCI_FORMATRANGEFULL We should move should move to these APIs, as the predecessors will be deprecated sooner or later. Not sure if it affects GTK-backend on win32 as well? - Change bar (probably similar to the git-changebar plugin) You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3551
-- Commit Summary --
* Update Scintilla to version 5.3.6
-- File Changes --
M meson.build (2) M scintilla/gtk/Converter.h (7) M scintilla/gtk/PlatGTK.cxx (494) M scintilla/gtk/ScintillaGTK.cxx (289) M scintilla/gtk/ScintillaGTK.h (14) M scintilla/gtk/ScintillaGTKAccessible.cxx (9) M scintilla/include/Scintilla.h (60) M scintilla/include/Scintilla.iface (80) M scintilla/include/ScintillaCall.h (21) M scintilla/include/ScintillaMessages.h (13) M scintilla/include/ScintillaStructures.h (26) M scintilla/include/ScintillaTypes.h (35) M scintilla/lexilla/include/Lexilla.h (16) M scintilla/lexilla/include/SciLexer.h (32) M scintilla/lexilla/lexers/LexBash.cxx (935) M scintilla/lexilla/lexers/LexBatch.cxx (59) M scintilla/lexilla/lexers/LexCPP.cxx (210) M scintilla/lexilla/lexers/LexCmake.cxx (2) M scintilla/lexilla/lexers/LexCoffeeScript.cxx (8) M scintilla/lexilla/lexers/LexDiff.cxx (57) M scintilla/lexilla/lexers/LexGDScript.cxx (43) M scintilla/lexilla/lexers/LexHTML.cxx (163) M scintilla/lexilla/lexers/LexJulia.cxx (4) M scintilla/lexilla/lexers/LexLua.cxx (6) M scintilla/lexilla/lexers/LexMake.cxx (36) M scintilla/lexilla/lexers/LexMarkdown.cxx (123) M scintilla/lexilla/lexers/LexMatlab.cxx (200) M scintilla/lexilla/lexers/LexNsis.cxx (4) M scintilla/lexilla/lexers/LexPowerShell.cxx (83) M scintilla/lexilla/lexers/LexProps.cxx (39) M scintilla/lexilla/lexers/LexPython.cxx (103) M scintilla/lexilla/lexers/LexR.cxx (252) M scintilla/lexilla/lexers/LexRuby.cxx (778) M scintilla/lexilla/lexers/LexRust.cxx (2) M scintilla/lexilla/lexers/LexSQL.cxx (6) M scintilla/lexilla/lexers/LexVHDL.cxx (18) M scintilla/lexilla/lexers/LexYAML.cxx (87) M scintilla/lexilla/lexlib/CharacterCategory.cxx (190) M scintilla/lexilla/lexlib/CharacterSet.h (15) M scintilla/lexilla/lexlib/DefaultLexer.cxx (3) M scintilla/lexilla/lexlib/LexAccessor.cxx (9) M scintilla/lexilla/lexlib/LexAccessor.h (30) M scintilla/lexilla/lexlib/LexerModule.cxx (2) M scintilla/lexilla/lexlib/LexerModule.h (2) M scintilla/lexilla/lexlib/OptionSet.h (4) M scintilla/lexilla/lexlib/PropSetSimple.cxx (8) M scintilla/lexilla/lexlib/StyleContext.cxx (39) M scintilla/lexilla/lexlib/StyleContext.h (104) M scintilla/lexilla/lexlib/WordList.cxx (25) M scintilla/lexilla/lexlib/WordList.h (1) M scintilla/lexilla/src/Lexilla.cxx (10) M scintilla/lexilla/version.txt (2) M scintilla/src/CallTip.cxx (22) M scintilla/src/CallTip.h (6) M scintilla/src/CaseConvert.cxx (197) M scintilla/src/CaseFolder.cxx (34) M scintilla/src/CaseFolder.h (8) M scintilla/src/CellBuffer.cxx (182) M scintilla/src/CellBuffer.h (33) M scintilla/src/CharacterCategoryMap.cxx (190) M scintilla/src/ContractionState.cxx (83) M scintilla/src/ContractionState.h (1) M scintilla/src/Decoration.cxx (48) M scintilla/src/Decoration.h (2) M scintilla/src/Document.cxx (239) M scintilla/src/Document.h (70) M scintilla/src/EditModel.cxx (8) M scintilla/src/EditModel.h (6) M scintilla/src/EditView.cxx (1268) M scintilla/src/EditView.h (53) M scintilla/src/Editor.cxx (741) M scintilla/src/Editor.h (60) M scintilla/src/Geometry.cxx (20) M scintilla/src/Geometry.h (29) M scintilla/src/Indicator.cxx (28) M scintilla/src/KeyMap.cxx (4) M scintilla/src/KeyMap.h (2) M scintilla/src/LineMarker.cxx (47) M scintilla/src/MarginView.cxx (101) M scintilla/src/MarginView.h (2) M scintilla/src/Partitioning.h (128) M scintilla/src/PerLine.cxx (57) M scintilla/src/PerLine.h (42) M scintilla/src/Platform.h (2) M scintilla/src/PositionCache.cxx (304) M scintilla/src/PositionCache.h (67) M scintilla/src/RESearch.cxx (31) M scintilla/src/RESearch.h (2) M scintilla/src/RunStyles.cxx (118) M scintilla/src/RunStyles.h (10) M scintilla/src/ScintillaBase.cxx (82) M scintilla/src/ScintillaBase.h (4) M scintilla/src/Selection.h (10) M scintilla/src/SparseVector.h (143) M scintilla/src/SplitVector.h (28) M scintilla/src/Style.cxx (3) M scintilla/src/Style.h (1) M scintilla/src/UniConversion.cxx (4) M scintilla/src/UniConversion.h (2) M scintilla/src/UniqueString.cxx (2) M scintilla/src/UniqueString.h (7) M scintilla/src/ViewStyle.cxx (89) M scintilla/src/ViewStyle.h (18) M scintilla/src/XPM.cxx (22) M scintilla/src/XPM.h (4) M scintilla/version.txt (2)
-- Patch Links --
https://github.com/geany/geany/pull/3551.patch https://github.com/geany/geany/pull/3551.diff
@kugel- pushed 1 commit.
897fae69e545755e1f0482adf793b3a69ba517c1 fixup! Update Scintilla to version 5.3.6
@kugel- pushed 2 commits.
7dcce183d90756468d07db7f6650d22da137ab1a fixup! Update Scintilla to version 5.3.6 3788b6fa478d4e33693c0919ab35d00f04e6e3b3 Map new python "attribute" mapping to identifier_2, by default.
@kugel- pushed 2 commits.
1f38f26962ce14e0ebeacda706017ecff998051b fixup! Update Scintilla to version 5.3.6 55aabfa14d91751dca373c9e982dce3d9dea97d6 fixup! Map new python "attribute" mapping to identifier_2, by default.
[0001-Fix-assertion-failure-on-some-system-when-an-INDIC_S.patch.gz](https://github.com/geany/geany/files/12593500/0001-Fix-assertion-failure-on-...)
See:
* [geany-plugins#1272](https://github.com/geany/geany-plugins/issues/1272) * [scintilla/652df8](https://sourceforge.net/p/scintilla/code/ci/652df80a41a010f404be51410d921f2d...).
@kugel- works for me, thanks for doing yet another Scintilla update, and with patch that @xiota cherry picked from Scintilla to avoid UB.
@eht16 commented on this pull request.
@@ -21,6 +21,7 @@ fstring=string_1
fcharacter=character ftriple=string_2 ftripledouble=string_2 +attribute=identifier_1ö
`ö` :)
As @kugel- pointed out elsewhere, this replaces #3441. So is the GDscript change on #3441 needed here as well?
@kugel- pushed 4 commits.
32a450f4922419d0771be2479b7b97b6a363fa3a fixup! Map new python "attribute" mapping to identifier_2, by default. aeee043f1942e2c3e88fcda3cff5f89fdf35c773 Map new ruby lex classes to existing styles, for now. 37b15b0cf9739c04ff50f53944e2874b095e52b6 Handle new styles for strings in R (rawstrings, backticks, espaces) 1caf9e0708c1ee4f3747fa6005fcc55aca35bb40 Handle new nodepath style for gdscript
@kugel- don't forget [this](https://sourceforge.net/p/scintilla/code/ci/652df80a41a010f404be51410d921f2d...), fixes crasher in https://github.com/geany/geany-plugins/issues/1272
[Handle new styles for strings in R (rawstrings, backticks, espaces](https://github.com/geany/geany/pull/3551/commits/37b15b0cf9739c04ff50f53944e...)
I would defer to [@zufuliu's patch][0] as being simpler and slightly optimizing the iteration count. IIUC, [it's Geany's policy][1] to only consume upstream patches anyway.
[0]: https://github.com/ScintillaOrg/lexilla/issues/206#issuecomment-1732208654 [1]: https://github.com/geany/geany/pull/3171#issuecomment-1594078454
@rdipardo I don't understand, the commit by @kugel- is the mapping of lexer entities to styles within Geany, the patch by @zufuliu is to Scintilla, they are totally different and not interchangable?
@elextr, yes, I see now the commit only touched filedefs (after expanding the diffs that GitHub's device fingerprinting scripts decided to collapse for my diminutive screen).
At least the Prolog enthusiasts now have a mentioned thread to follow, in case they want to know what's blocking #3171.
Speaking of filedefs, has anyone had a chance to look at the suite of new properties the shell lexer acquired in recent versions? Most of them are for embedded variables, for example [inside here docs][1]:
<img alt="scite-538-lex-bash" width="380" src="https://github.com/geany/geany/assets/59004801/045a6d60-ba67-4875-9948-c1d62ddfeac7" />
The command substitution preference also became a set of [enumerated options][2]:
| | | | :-- | :-- | | lexer.bash.command.substitution | Set how to highlight $() command substitution. 0 (the default) highlighted as backticks. 1 highlighted inside. 2 highlighted inside with extra scope tracking. | | lexer.bash.nested.backticks | Set this property to 0 to disable nested backquoted command substitution. | | lexer.bash.styling.inside.backticks | Set this property to 1 to highlight shell expansions inside backticks. | | lexer.bash.styling.inside.heredoc | Set this property to 1 to highlight shell expansions inside here document. | | lexer.bash.styling.inside.parameter | Set this property to 1 to highlight shell expansions inside ${} parameter expansion. | | lexer.bash.styling.inside.string | Set this property to 1 to highlight shell expansions inside string. |
[0]: https://www.scintilla.org/SciTEDoc.html#:~:text=lexer.bash.command.substitut... [1]: https://github.com/ScintillaOrg/lexilla/commit/d45abec81fa44cb7fe15fdc609d0a... [2]: https://github.com/ScintillaOrg/lexilla/commit/119ad899ebe33c8c0acca8a4a3e7e...
You should be able to set options in the `[lexer_proterties]` section of the filetype file, so you can try all those out and see what they do.
@kugel- don't forget [this](https://sourceforge.net/p/scintilla/code/ci/652df80a41a010f404be51410d921f2d...), fixes crasher in [geany/geany-plugins#1272](https://github.com/geany/geany-plugins/issues/1272)
Scintilla 5.3.7 was released including the fix. I'll bump to that version.
@eht16 do you know what's wrong with the Windows CI?
@kugel- pushed 3 commits.
e8505313619d77a162f4a0cb620b9aee28dbb22c Update scintilla_changes.patch b7655b6920d213f8de8dfd102fe8aacae69a70ab Update to Scintilla 5.3.7 and Lexilla 5.2.7 4e4b3ed43d594577d1738759e2d99aae1358049a Update scintilla/scintilla_changes.patch and update-scintilla.sh
https://github.com/ScintillaOrg/lexilla/issues/206 fixed after the 5.2.7 release. I did not backport the fix. I think R is not relevant enough to carry an additional change to Lexilla, or is it?
I think R is not relevant enough to carry an additional change to Lexilla, or is it?
I'm not sure "relevant" is well defined, thats a personal judgement depending if you use R :-). I would think only patches that fix crashes need to be carried outside Scintilla releases, thats the only reason I mentioned the one above.
@eht16 do you know what's wrong with the Windows CI?
No :(. I can succesfully build the image with normal Docker on a native Linux system. Either something changed on how the Gitlab runners are implemented or something in `pacman` changed, still unsure what is causing this. So far I didn't find any relevant information on the net. I'll try if it is enough to just create `/etc/mtab`.
@kugel- pushed 1 commit.
e4feb5cab6e4e2b878fae7be7cbd20ceb729fedf Enable new Scintilla "Change History"
I added a commit to enable the change history since it was trivial. Seems like a nice, user-visible change to take along (gives a bit of a modern feeling).
Before saving ![before_save](https://github.com/geany/geany/assets/564520/2b3e306a-6523-4db8-85ed-9705fbb...)
After saving ![after_save](https://github.com/geany/geany/assets/564520/38216f66-3430-46af-9cf4-073ddd8...)
@eht16 what version of g++/libstdc++ is used for windows, nowhere does the version get printed in configure or build, grrrr? The build is now running but failing when it can't find `std::mutex` (and yes Neil did `#include <mutex>` https://github.com/geany/geany/blob/e4feb5cab6e4e2b878fae7be7cbd20ceb729fedf...). That is C++11 AFAIK so not sure why it fails unless you are using an ancient version of g++. I suspect Scintilla (not just Lexilla) now needs a real C++17 toolset.
AFAIK scintilla needs C++17 since version 4?
Yes, but there were "C++17 compliant(ish)" and "really C++17 compliant" versions of stdlibs. Scintilla didn't start using threading and futures and other concurrency features until these latest few versions, and older libraries might not support them. At least thats the only reason I can think of that it gives the current errors. But as I said `Mutex` is C++11 so it really should work by now.
@eht16 what version of g++/libstdc++ is used for windows, nowhere does the version get printed in configure or build, grrrr?
In https://github.com/geany/geany/actions/runs/6322193707/job/17167381804?pr=35... we show basic build environment information. Adding the gcc/g++ version is easy, maybe also the libstdc++ version as well. Anything else you are missing? From the log of the image build, gcc 10.2 and libstdc++6 10.2 is used.
Is gcc 10 fine in general? We could upgrade the Mingw64 build image to Debian Bookworm (currently Bullseye) to get newer gcc versions but on my last attempt this caused weired errors and so I decided to postpone it to after the release.
The CI build is now running
It's running only because I added a workaround in https://github.com/geany/infrastructure/pull/10 to the image build which worked and I accidentally pushed the resulting image to the registry, so it can now be used for other builds. This is OK for the moment but I would still like to know the background of the /etc/mtab problem.
Is gcc 10 fine in general?
On an old machine (note to self: upgrade it) linux `g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0` works here (this PR builds and runs fine).
I really don't know what is wrong with the mingw build at this point.
Is gcc 10 fine in general?
On an old machine (note to self: upgrade it) linux `g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0` works here (this PR builds and runs fine).
I really don't know what is wrong with the mingw build at this point.
Me neither. https://github.com/geany/infrastructure/pull/10 fixes the first problem with the Docker mingw64 image build. Since this is done now, I will test this PR on a real Windows system to see if it compiles there (I guess yes).
Adding the gcc/g++ version is easy, maybe also the libstdc++ version as well.
👍 Not aware of anything else.
Will do later.
The build failures are not because the used compiler is too old but it's missing features: https://sourceforge.net/p/mingw-w64/bugs/959/
https://github.com/geany/geany/pull/3568 changes the used cross compiler toolchain to its "posix" variant which has all necessary C++ features and so the build will succeed.
I added there some more information about the used compiler to the build log.
@kugel- @elextr should we include the patch from https://groups.google.com/g/scintilla-interest/c/_tiE_nSaiG4/m/v0e8lzTjAQAJ here?
I'd say yes because the next Scintilla release might be after the upcoming Geany release and the issue might also affect Geany users.
Apart from that (we can merge that patch individually if we agree on it), is there anything blocking?
The PR adds new string thanks to the change history feature so need to merge before the string freeze
I'm fine with merge. The failed Windows CI build is handled seperately.
Only one minor thing, I guess we should bump plugin API version because `GeanyIndentPrefs` and Scintilla itself are part of the plugin API.
@eht16 did it build ok on "real" windows, preferably whatever is going to be used to make the release so we know that will be ok?
Otherwise I'm fine with it, it works for me on Linux.
Yes, it builds fine on native Windows as there the compiler from MSYS2 is used. Sorry forgot to mention this, all the build problems are specific to the used cross compiler toolchain used in the CI builds.
@elextr approved this pull request.
Fine. I'll merge and bump the plugin API separately.
Regarding https://groups.google.com/g/scintilla-interest/c/_tiE_nSaiG4/m/v0e8lzTjAQAJ, I think it's a bit too early to jump on that patch. The problem seems to an extreme edge case and the proposed solution is not yet released or even in Scintilla mainline.
The problem seems to an extreme edge case and the proposed solution is not yet released or even in Scintilla mainline.
Yes agreed, and if it is a problem the changebars can be turned off in prefs.
@kugel- pushed 8 commits.
19336d22946b77bbcb5131544ea0e6317cdcf6b5 Update Scintilla to version 5.3.7 9aa597e945876aa61024de1ff6398fa5eba281f0 Map new python "attribute" mapping to identifier_2, by default. 7f78ddf694cda6a50f93dacb2d6008d6c6bcfdfe Map new ruby lex classes to existing styles, for now. 0f04b2437c4f6e6dd9bd4ed5ace1c27dd16c1efb Handle new styles for strings in R (rawstrings, backticks, espaces) 59d8aee1a8bbb125c38257b60da85a5ae46de36f Handle new nodepath style for gdscript 560ec26d280253b177631dbae8ecdf92ec2fd88f Update scintilla_changes.patch 25c568726693baa9a15347f743f5b0dbbb656ca0 Enable new Scintilla "Change History" 75d528db86cc6f7a77024b39a0afe73fe74f0c4c Bump plugin API
Merged #3551 into master.
I added a commit to enable the change history since it was trivial. Seems like a nice, user-visible change to take along (gives a bit of a modern feeling).
I'm a tad late to the party (as usual), but I don't think it should be enabled by default. Here's a few reasons: * I've seen it do odd stuff (when I <kbd>^Z</kbd>d a change on a line, it stayed green, yet didn't match the saved state), so I'm wondering if it's already stable enough… but maybe it's just because it matched *one* of the saved states of the file because I did save that previous state before!? * if you reload the file, everything becomes green… * if someone doesn't have the marker margin visible, background rendering is quite intrusive (especially after reloading the file :wink: ) * I personally don't understand the point of the feature. Why would I want to see changes since the file was loaded? It's might be nice to see which lines aren't saved, but having everything since the file was loaded I don't understand the use case. * I think it's not entirely obvious what the feature is about if you don't know it. Meaning that if I just opened Geany, I could wonder what the heck was that thing. * Colors are a bit off with the default theme (or any for that matter), maybe we'd need some way to adjust that?
The problem seems to an extreme edge case
Not saying it's common, but AFAIR bulk search & replace will do that (potentially massively change lines from the end to the start)
I guess Neil added this because somebody wanted it. I can see that there are times when knowing what was changed in a session is useful. Since last save is maybe less useful since most IDEs have autosave and lots of people seem to like it.
But as @b4n points out there are operations that can produce unusable results when blindly recording lines edited since session start.
Other IDEs (the ones I tested) show diffs to git, not just the session, thats probably more useful. Maybe, depends how good the diff algorithm is, I'm sure we all have seen excessive github diffs for small changes.
Styling just needs "somebody" to add settings for the relevant marker and indicator types to the colour schemes files.
Anyway, its in Scintilla, we might as well make it available to users, the only question is by default or not. I don't have a strong feeling either way.
After having used the change history for a few days now, I also think it might be better disabled by default so users should enable it explicitly if desired.
@kugel- More importantly, we should document it. At the very least there should be a few lines describing the feature at https://github.com/geany/geany/blob/master/doc/geany.txt?plain=1#L2295.
I will take care of updated screenshots seperately.
"Change history" docs will be added in https://github.com/geany/geany/pull/3593.
github-comments@lists.geany.org