Update to scintilla, incl. lexilla split-off.
Closes #2824 You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2867
-- Commit Summary --
* Update Scintilla to version 5.1.1 * Update scintilla_changes.patch * Update update-scintilla.sh
-- File Changes --
M plugins/Makefile.am (1) M scintilla/License.txt (4) M scintilla/Makefile.am (332) M scintilla/gtk/PlatGTK.cxx (1211) M scintilla/gtk/ScintillaGTK.cxx (639) M scintilla/gtk/ScintillaGTK.h (61) M scintilla/gtk/ScintillaGTKAccessible.cxx (189) M scintilla/gtk/ScintillaGTKAccessible.h (18) D scintilla/include/Compat.h (70) M scintilla/include/ILexer.h (22) M scintilla/include/ILoader.h (4) D scintilla/include/Makefile.am (15) D scintilla/include/Platform.h (549) M scintilla/include/Scintilla.h (117) M scintilla/include/Scintilla.iface (2459) A scintilla/include/ScintillaCall.h (881) A scintilla/include/ScintillaMessages.h (788) A scintilla/include/ScintillaStructures.h (103) A scintilla/include/ScintillaTypes.h (803) D scintilla/julia_lexilla_v5.patch (36) A scintilla/lexilla/License.txt (20) A scintilla/lexilla/include/LexicalStyles.iface (2252) A scintilla/lexilla/include/Lexilla.h (108) R scintilla/lexilla/include/SciLexer.h (22) R scintilla/lexilla/lexers/LexAbaqus.cxx (5) R scintilla/lexilla/lexers/LexAda.cxx (3) R scintilla/lexilla/lexers/LexAsm.cxx (9) R scintilla/lexilla/lexers/LexBash.cxx (7) R scintilla/lexilla/lexers/LexBasic.cxx (11) R scintilla/lexilla/lexers/LexBatch.cxx (57) R scintilla/lexilla/lexers/LexCOBOL.cxx (5) R scintilla/lexilla/lexers/LexCPP.cxx (134) R scintilla/lexilla/lexers/LexCSS.cxx (5) R scintilla/lexilla/lexers/LexCaml.cxx (139) R scintilla/lexilla/lexers/LexCmake.cxx (5) R scintilla/lexilla/lexers/LexCoffeeScript.cxx (5) R scintilla/lexilla/lexers/LexD.cxx (9) R scintilla/lexilla/lexers/LexDiff.cxx (5) R scintilla/lexilla/lexers/LexErlang.cxx (17) R scintilla/lexilla/lexers/LexForth.cxx (5) R scintilla/lexilla/lexers/LexFortran.cxx (5) R scintilla/lexilla/lexers/LexHTML.cxx (69) R scintilla/lexilla/lexers/LexHaskell.cxx (9) R scintilla/lexilla/lexers/LexJulia.cxx (12) R scintilla/lexilla/lexers/LexLaTeX.cxx (8) R scintilla/lexilla/lexers/LexLisp.cxx (5) R scintilla/lexilla/lexers/LexLua.cxx (49) R scintilla/lexilla/lexers/LexMake.cxx (5) R scintilla/lexilla/lexers/LexMarkdown.cxx (67) R scintilla/lexilla/lexers/LexMatlab.cxx (7) R scintilla/lexilla/lexers/LexNsis.cxx (5) R scintilla/lexilla/lexers/LexNull.cxx (5) R scintilla/lexilla/lexers/LexPO.cxx (5) R scintilla/lexilla/lexers/LexPascal.cxx (5) R scintilla/lexilla/lexers/LexPerl.cxx (7) R scintilla/lexilla/lexers/LexPowerShell.cxx (5) R scintilla/lexilla/lexers/LexProps.cxx (3) R scintilla/lexilla/lexers/LexPython.cxx (7) R scintilla/lexilla/lexers/LexR.cxx (5) R scintilla/lexilla/lexers/LexRuby.cxx (55) R scintilla/lexilla/lexers/LexRust.cxx (7) R scintilla/lexilla/lexers/LexSQL.cxx (7) R scintilla/lexilla/lexers/LexSmalltalk.cxx (5) R scintilla/lexilla/lexers/LexTCL.cxx (12) R scintilla/lexilla/lexers/LexTxt2tags.cxx (5) R scintilla/lexilla/lexers/LexVHDL.cxx (5) R scintilla/lexilla/lexers/LexVerilog.cxx (7) R scintilla/lexilla/lexers/LexYAML.cxx (15) R scintilla/lexilla/lexlib/Accessor.cxx (9) R scintilla/lexilla/lexlib/Accessor.h (6) R scintilla/lexilla/lexlib/CatalogueModules.h (8) R scintilla/lexilla/lexlib/CharacterCategory.cxx (149) R scintilla/lexilla/lexlib/CharacterCategory.h (2) R scintilla/lexilla/lexlib/CharacterSet.cxx (4) R scintilla/lexilla/lexlib/CharacterSet.h (103) R scintilla/lexilla/lexlib/DefaultLexer.cxx (11) R scintilla/lexilla/lexlib/DefaultLexer.h (10) A scintilla/lexilla/lexlib/LexAccessor.cxx (70) R scintilla/lexilla/lexlib/LexAccessor.h (43) R scintilla/lexilla/lexlib/LexerBase.cxx (13) R scintilla/lexilla/lexlib/LexerBase.h (10) R scintilla/lexilla/lexlib/LexerModule.cxx (5) R scintilla/lexilla/lexlib/LexerModule.h (8) R scintilla/lexilla/lexlib/LexerNoExceptions.cxx (9) R scintilla/lexilla/lexlib/LexerNoExceptions.h (10) R scintilla/lexilla/lexlib/LexerSimple.cxx (7) R scintilla/lexilla/lexlib/LexerSimple.h (8) R scintilla/lexilla/lexlib/OptionSet.h (4) A scintilla/lexilla/lexlib/PropSetSimple.cxx (75) A scintilla/lexilla/lexlib/PropSetSimple.h (31) R scintilla/lexilla/lexlib/SparseState.h (2) R scintilla/lexilla/lexlib/StringCopy.h (2) R scintilla/lexilla/lexlib/StyleContext.cxx (35) R scintilla/lexilla/lexlib/StyleContext.h (11) R scintilla/lexilla/lexlib/SubStyles.h (46) R scintilla/lexilla/lexlib/WordList.cxx (2) R scintilla/lexilla/lexlib/WordList.h (2) A scintilla/lexilla/src/Lexilla.cxx (432) A scintilla/lexilla/version.txt (1) D scintilla/lexlib/PropSetSimple.cxx (157) D scintilla/lexlib/PropSetSimple.h (28) M scintilla/scintilla_changes.patch (214) M scintilla/src/AutoComplete.cxx (61) M scintilla/src/AutoComplete.h (16) M scintilla/src/CallTip.cxx (168) M scintilla/src/CallTip.h (25) M scintilla/src/CaseConvert.cxx (65) M scintilla/src/CaseConvert.h (18) M scintilla/src/CaseFolder.cxx (4) M scintilla/src/CaseFolder.h (2) D scintilla/src/Catalogue.cxx (117) D scintilla/src/Catalogue.h (24) M scintilla/src/CellBuffer.cxx (250) M scintilla/src/CellBuffer.h (54) M scintilla/src/CharClassify.cxx (20) M scintilla/src/CharClassify.h (17) A scintilla/src/CharacterCategoryMap.cxx (0) A scintilla/src/CharacterCategoryMap.h (0) A scintilla/src/CharacterType.cxx (0) A scintilla/src/CharacterType.h (0) M scintilla/src/ContractionState.cxx (0) M scintilla/src/ContractionState.h (0) M scintilla/src/DBCS.cxx (0) M scintilla/src/DBCS.h (0) A scintilla/src/Debugging.h (0) M scintilla/src/Decoration.cxx (0) M scintilla/src/Decoration.h (0) M scintilla/src/Document.cxx (0) M scintilla/src/Document.h (0) M scintilla/src/EditModel.cxx (0) M scintilla/src/EditModel.h (0) M scintilla/src/EditView.cxx (0) M scintilla/src/EditView.h (0) M scintilla/src/Editor.cxx (0) M scintilla/src/Editor.h (0) M scintilla/src/ElapsedPeriod.h (0) D scintilla/src/ExternalLexer.cxx (0) D scintilla/src/ExternalLexer.h (0) M scintilla/src/FontQuality.h (0) A scintilla/src/Geometry.cxx (0) A scintilla/src/Geometry.h (0) M scintilla/src/Indicator.cxx (0) M scintilla/src/Indicator.h (0) D scintilla/src/IntegerRectangle.h (0) M scintilla/src/KeyMap.cxx (0) M scintilla/src/KeyMap.h (0) M scintilla/src/LineMarker.cxx (0) M scintilla/src/LineMarker.h (0) M scintilla/src/MarginView.cxx (0) M scintilla/src/MarginView.h (0) M scintilla/src/Partitioning.h (0) M scintilla/src/PerLine.cxx (0) M scintilla/src/PerLine.h (0) A scintilla/src/Platform.h (0) M scintilla/src/Position.h (0) M scintilla/src/PositionCache.cxx (0) M scintilla/src/PositionCache.h (0) M scintilla/src/RESearch.cxx (0) M scintilla/src/RESearch.h (0) M scintilla/src/RunStyles.cxx (0) M scintilla/src/RunStyles.h (0) D scintilla/src/SVector.h (0) M scintilla/src/ScintillaBase.cxx (0) M scintilla/src/ScintillaBase.h (0) M scintilla/src/Selection.cxx (0) M scintilla/src/Selection.h (0) M scintilla/src/SparseVector.h (0) M scintilla/src/SplitVector.h (0) M scintilla/src/Style.cxx (0) M scintilla/src/Style.h (0) M scintilla/src/UniConversion.cxx (0) M scintilla/src/UniConversion.h (0) D scintilla/src/UnicodeFromUTF8.h (0) M scintilla/src/UniqueString.cxx (0) M scintilla/src/UniqueString.h (0) M scintilla/src/ViewStyle.cxx (0) M scintilla/src/ViewStyle.h (0) M scintilla/src/XPM.cxx (0) M scintilla/src/XPM.h (0) M scintilla/version.txt (0) M scripts/update-scintilla.sh (0) M src/Makefile.am (0) M src/sciwrappers.c (0)
-- Patch Links --
https://github.com/geany/geany/pull/2867.patch https://github.com/geany/geany/pull/2867.diff
@rdipardo commented on this pull request.
@@ -51,15 +54,15 @@
#include "CharacterSet.h" #include "LexerModule.h"
-using namespace Scintilla; +using namespace Lexilla;
static inline bool IsNewline(const int ch) { return (ch == '\n' || ch == '\r');
Correct me if I'm wrong, but it seems the lexilla sources were pulled from [the rel-5-1-1 tag](https://github.com/ScintillaOrg/lexilla/commit/d83927f9794b5213ca52fc03c094b...).
If that's the case, you will want to patch in [this recent fix] for LexMarkdown; the v5.1.1 release contains [a bug that could hang the editor] if a user encounters it.
[this recent fix]: https://github.com/ScintillaOrg/lexilla/commit/68ff521b53fac828d07d234d33032...
[a bug that could hang the editor]: https://github.com/ScintillaOrg/lexilla/issues/23
cf. https://github.com/geany/geany/issues/1439#issuecomment-896544368
@kugel- ummm, can you see why travis has failed? It looks like configure was missing Makefile.in, but autogen.sh should have generated it IIUC?
@kugel- commented on this pull request.
@@ -51,15 +54,15 @@
#include "CharacterSet.h" #include "LexerModule.h"
-using namespace Scintilla; +using namespace Lexilla;
static inline bool IsNewline(const int ch) { return (ch == '\n' || ch == '\r');
I downloaded the last zip. I guess we can quickly pull 5.1.2 once out.
I removed a Makefile.am but didn't update configure.ac, that's probably why.
@rdipardo commented on this pull request.
@@ -51,15 +54,15 @@
#include "CharacterSet.h" #include "LexerModule.h"
-using namespace Scintilla; +using namespace Lexilla;
static inline bool IsNewline(const int ch) { return (ch == '\n' || ch == '\r');
No problema; since "The Great Schism" Neil's been averaging a release per month, so it's probably just a week or two away.
@kugel- pushed 1 commit.
03a7f19a0921deadd11e568d5ed79adf1d8ca0e8 fixup! Update Scintilla to version 5.1.1
@kugel- pushed 1 commit.
e8096c76c742fbf39fadf64d9263f4ee4fd373b8 fixup! Update Scintilla to version 5.1.1
@rdipardo commented on this pull request.
Almost there; it should be a simple matter of adding [some missing headers](https://app.travis-ci.com/github/geany/geany/jobs/533113114#L2538):
```diff diff --git a/scintilla/Makefile.am b/scintilla/Makefile.am index f866ca48b..d6c85545e 100644 --- a/scintilla/Makefile.am +++ b/scintilla/Makefile.am @@ -7,8 +7,15 @@ scintilla_includedir = $(includedir)/geany/scintilla/ scintilla_include_HEADERS = \ include/Scintilla.h \ include/Scintilla.iface \ +include/ScintillaCall.h \ +include/ScintillaMessages.h \ +include/ScintillaStructures.h \ +include/ScintillaTypes.h \ include/ScintillaWidget.h \ -include/Sci_Position.h +include/Sci_Position.h \ +lexilla/include/LexicalStyles.iface \ +lexilla/include/Lexilla.h \ +lexilla/include/SciLexer.h
LEXER_SRCS = \ lexilla/lexers/LexAbaqus.cxx \ ```
@kugel- pushed 1 commit.
cfc2b2294710d91a3ca3498e9d99960427a035f3 fixup! Update Scintilla to version 5.1.1
@elextr @eht16 @b4n so it builds and from a quick look C and bash source code looks alright. What are the next steps?
Windows? Macos? Other filetypes?
I'm interested in taking a look (on Linux) but it won't be for a few weeks.
Then I guess it means waiting for the release before merging something this big.
I added a list of all lexers that we use. I'll first look for any that contain only trivial changes (like namespace Scintilla -> Lexilla)
I'll first look for any that contain only trivial changes
Good idea, eliminate those that git diff says have no real changes. Then effort can go on those that need checking.
Windows? Macos?
Why do you think they need to be checked specifically? Don't we use the GTK backend on those as well?
I might setup a windows vm, I guess I "want" one anyway to check meson.
I was more thinking of checking if the build processes on Windows and macOS worked. But also since Neil doesn't check Scintilla GTK on Windows or macOS (AFAIK) they do need to be checked that there are no unforseen issues. Windows and macOS are not the best supported platforms for GTK, so unexpected things should always be expected :)
As far as Windows goes, probably best to wait until @eht16 can access his laptop again to get his new Windows build Docker image, that will be GTK3 IIUC.
I'm about testing this on Windows. So far it built fine but I wasn't able yet to run Geany with the changes (due to unrelated problems with my build environment). Will test it later again once the other problems are resolved.
I'm about testing this on Windows. So far it built fine but I wasn't able yet to run Geany with the changes (due to unrelated problems with my build environment). Will test it later again once the other problems are resolved.
Tested and works fine. I didn't extensive testing but highlighting for different filetypes works as well as auto completion and calltips popups. Good job!
WFM, only compile message is the deprecation message you mentioned before.
``` 08:30:51: Geany INFO : Geany 1.38 (git >= cfc2b229), en_AU.UTF-8 08:30:51: Geany INFO : GTK 3.24.20, GLib 2.64.6 08:30:51: Geany INFO : OS: Linux Mint 20 (ulyana) ```
Sadly it hasn't fixed the Deja-vu underline problem, at least for 10 point and 11 point sizes on my 27" QHD monitor :frowning_face:
And rectangular selections seems to work (the change to multiple selections was one concern).
@elextr commented on this pull request.
@@ -51,15 +54,15 @@
#include "CharacterSet.h" #include "LexerModule.h"
-using namespace Scintilla; +using namespace Lexilla;
static inline bool IsNewline(const int ch) { return (ch == '\n' || ch == '\r');
Also Neil just committed a possible fix for the dreaded Ubuntunderline DevaVu issue #2502 so picking up the next release would be really good :rocket: :champagne:
During my discussions with Neil that produced the likely fix for the DevaVu underlines he noticed that on Fedora 34 Wayland Gnome there were strange artifacts in Scite if the scaling factor is changed with the font selection page of Gnome Tweaks (say to 1.2 1.4 etc) see the top image [here](https://www.scintilla.org/GTKScaling.png).
This doesn't happen with my Mint here, if anyone has Fedora 34 can they try Geany and see if it works when changing the fine scaling with Gnome tweaks?
Scintilla 5.1.2 is imminent. I'm currently planning to migrate to that in a separate PR if that's OK, so that this PR can be merged earlier and the 5.1.{1 -> 2} diff can be treated on its own.
I think we're ready to merge here. I'd like to merge asap after 1.38 is out.
I think we're ready to merge here. I'd like to merge asap after 1.38 is out.
Agree, I've been using this since my comments above with no problem (but Geany use is limited) and then we can test the upgrade process by going to 5.1.2
And thanks for doing it.
Merged #2867 into master.
@kugel- BOOM!!! now to try the upgrade process for Scintilla 5.1.2.
Yay for early merge!
@kugel- I noticed to issues now that it is merged (which is good): - the plugins fail to build (https://www.geany.org/p/KquBW/raw/) - maybe it's the plugin's fault or maybe not. We should at least check if the changed behavior is desired. - middle click paste in the editor widget doesn't work anymore (on Linux)
it seems we do not install include/geany/scintilla/SciLexer.h any longer. I guess this is not on purpose?
Ahhh, all my (and I guess @kugel-) testing was done by applying changes to an existing build so we already had `SciLexer.h` installed. Indeed on a fresh clone it is not installed, just needs somebody with autotools knowledge to add it to the list.
middle click paste in the editor widget doesn't work anymore (on Linux)
Works for external selections, ie in other apps. Looks vaguely like right click might be moving the caret (and so removing the selection) before it queries the selection to paste. Probably should be raised as a Scintilla issue, but I no longer have a Sourceforge account since it won't let me reset my password after a password reset went wrong.
SciLexer.h fixed. Other problems are better tracked in distinct issues.
Thanks @kugel-!
The GeanyLua problem is already reported and linked.
For the primary clipboard problem I opened https://sourceforge.net/p/scintilla/bugs/2287/. Surprisingly, it's the same for Scite and there was no open/closed issue for it.
For the primary clipboard problem I opened https://sourceforge.net/p/scintilla/bugs/2287/. Surprisingly, it's the same for Scite and there was no open/closed issue for it.
JFTR: the primary cipboard problem has been fixed in https://sourceforge.net/p/scintilla/code/ci/5f9bffa5fcb0a91e68e0c3de0dd9c3d8....
Guess we get the clipboard fix in 5.1.4 then.
github-comments@lists.geany.org