Closed ildar closed 5 years ago
@ildar, correct, but unfortunately, there is no good way to interrogate Scintilla to check for that change. Switching to a one-argument version may not work either (although I'll have to test it). I wish there was a way to get the Scintilla version programmatically in wxlua, but as far as I remember, it wasn't available (GetLibraryVersionInfo()
is comment out in wxlua and I couldn't figure out how to implement wxVersionInfo
when I tried adding it).
Then maybe we can guess it during wxlua build either with parsing headers or giving the value manually as a last resort?
This won't work, as the same ZBS code has to work with multiple wxlua versions, so the check has to be in the IDE code somehow. The only option I see is to check explicitly for the wxwidgets version. Can you try the following patch:
diff --git a/src/editor/markup.lua b/src/editor/markup.lua
index bedc4935..fe9413df 100644
--- a/src/editor/markup.lua
+++ b/src/editor/markup.lua
@@ -200,7 +200,7 @@ function MarkupStyle(editor, lines, linee)
p = p + 1
smark = smark - 1
end
- editor:StartStyling(p, ide.STYLEMASK)
+ editor:StartStyling(p, ide.wxver < "3.1.2" and ide.STYLEMASK or 0)
editor:SetStyling(smark, markup[MD_MARK_MARK].st)
editor:SetStyling(t-f+1-smark-emark, markup[mark].st or markup[MD_MARK_MARK].st)
editor:SetStyling(emark, markup[MD_MARK_MARK].st)
@@ -214,7 +214,7 @@ function MarkupStyle(editor, lines, linee)
-- has this line changed its wrapping because of invisible styling?
if wrapped > 1 and editor:WrapCount(line) < wrapped then needfix = true end
end
- editor:StartStyling(es, ide.STYLEMASK)
+ editor:StartStyling(es, ide.wxver < "3.1.2" and ide.STYLEMASK or 0)
-- if any wrapped lines have changed, then reset WrapMode to fix the drawing
if needfix then
The edge version is 3.1.1 (or maybe even 3.1.0, need to check) But yes, 0 worked just fine. The idea with getting the version in wxlua implied storing it somewhere so that ZBS could get it from wxlua.
yes, we can get wxwidgets version number, but there is no access to the Scintilla version number, which is what we'd need to check here.
wxwidgets master should be 3.1.2, no?
commit 33cb18f5e1cdb172cb280ca6bf1cd68b55f845a5 (tag: v3.1.2)
Author: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Sun Dec 9 16:21:40 2018 +0100
Wxlua can't be built with 3.1.2, the issue still open. They made big API changes and you still didn't catch up I'm currently on 3.1.1.
Right, but the problem is that the current version of wxlua that ZBS is using is also 3.1.1 (wxwidgets was staying quite a bit of time on that version), so I can't use a check for 3.1.1 between two calls. I'll have to use the check for 3.1.2 with the expectation that wxlua gets integrated with the current wxwidgets master and then will work with the updated ZBS (that will include that check). I don't see another option unfortunately (and you'll probably need to update those calls manually in markup.lua if you want to run it with the latest wxwidgets 3.1.1).
Should it be OK to use the Dec 25, 2018 version on GitHub for ZBS? I'm not used to using list servers. I hope this is the correct way to post.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pkulchenko/ZeroBraneStudio/issues/994?email_source=notifications&email_token=AADL3MT6WCIGW7DRYN6GOU3PZEP3TA5CNFSM4HU2FEP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXDC7LA#issuecomment-499527596, or mute the thread https://github.com/notifications/unsubscribe-auth/AADL3MXZX75DHJ4XXONEP3TPZEP3TANCNFSM4HU2FEPQ .
@fireymerlin, there are some changes in wxwidgets that are incompatible with wxlua version that the IDE is using, so wxlua will need to be updated first to support that. For example, see pkulchenko/wxlua/issues/21
@ildar, I pushed changes to https://github.com/pkulchenko/wxlua/tree/wxwidgets312 that added GetLibraryVersionInfo
for wxSTC, which will now report its version.
I still can't figure out where the SetStyle
change happened to apply a proper check for it. Can you compile your 3.1.1 version using the latest wxlua and check what's returned when you run ide:GetEditor():GetLibraryVersionInfo():GetVersionString()
in ZBS console?
Good 😀👍 Yet I can do that mid next week. Thanks!
@ildar, I pushed a change that should fix the issue; let me know if you run into any issues with it.
just built it successfully, thanks a lot! everything looks fine except that https://github.com/pkulchenko/wxlua/issues/5 still persists.
Good; thank you for the update. I'll comment on pkulchenko/wxlua#5 in that ticket.
running ZBS with newer wxWindgets (namely 3.1.1) I get:
A simple search shew StartStyling is used in two-arg form which is deprecated. (file src/editor/markup.lua)