Discussion:
Marker sets background instead of symbol for some margin configuration
Paul K
2014-03-28 21:36:26 UTC
Permalink
Hi Neil,

I ran into a strange issue with symbol margins and can't figure out if this
is misunderstanding on my part or a bug.

I have three margins shown in this order (left-to-right): line number,
symbol, and folding margin. Everything works as expected with this setup.
When I reverse the order of symbol and fold margins, then the breakpoint
marker I register as _CIRCLE, shows up as line background. I tried
different types of markers, all with the same effect. The script that
reproduces this issue is below (in Lua). When the margin order is 0, 1, 2,
everything looks as expected; if you change the order to 0, 2, 1, you get
line background changed instead of a circle marker.

local LINENUM, SYMBOL, FOLD = 0, 1, 2 -- the issue is with 0, 2, 1 order
e:SetMarginWidth(LINENUM, e:TextWidth(32, "99999_"))
e:SetMarginWidth(SYMBOL, 16)
e:SetMarginType(SYMBOL, wxstc.wxSTC_MARGIN_SYMBOL)
e:SetMarginWidth(FOLD, 16)
e:SetMarginType(FOLD, wxstc.wxSTC_MARGIN_SYMBOL)
e:SetMarginMask(FOLD, wxstc.wxSTC_MASK_FOLDERS)
e:SetMarginSensitive(FOLD, true)

e:MarkerDefine(1, wxstc.wxSTC_MARK_CIRCLE, wx.wxColour(220, 0, 0),
wx.wxColour(220, 0, 0))
e:SetText("some\nmulti-line\ntext")
e:MarkerAdd(1, 1)

Is there something I'm doing incorrectly?

Paul.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Neil Hodgson
2014-03-29 23:01:14 UTC
Permalink
I have three margins shown in this order (left-to-right): line number, symbol, and folding margin. Everything works as expected with this setup. When I reverse the order of symbol and fold margins, then the breakpoint marker I register as _CIRCLE, shows up as line background. I tried different types of markers, all with the same effect. The script that reproduces this issue is below (in Lua). When the margin order is 0, 1, 2, everything looks as expected; if you change the order to 0, 2, 1, you get line background changed instead of a circle marker.
e:SetMarginWidth(SYMBOL, 16)
e:SetMarginType(SYMBOL, wxstc.wxSTC_MARGIN_SYMBOL)
e:SetMarginWidth(FOLD, 16)
e:SetMarginType(FOLD, wxstc.wxSTC_MARGIN_SYMBOL)
e:SetMarginMask(FOLD, wxstc.wxSTC_MASK_FOLDERS)
e:SetMarginSensitive(FOLD, true)
Now, which calls are not being performed for the problematic margin? Should they be and with what arguments?

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Paul K
2014-03-29 23:38:24 UTC
Permalink
Neil,
Post by Neil Hodgson
Now, which calls are not being performed for the problematic margin?
Should they be and with what arguments?

I think I got it; I should have set MarginMask. The reason why it was
working for the default arrangement is that you set ~SC_MASK_FOLDERS for
margin 1 by default.

Adding "e:SetMarginMask(SYMBOL, bit.bnot(wxstc.wxSTC_MASK_FOLDERS))" made
it work. Thank you.

Paul.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
Loading...