...
It goes a slightly different way, because I connect to the first cbStyledTextCtrl instead of the editor.
So resize-events in split-view are recognized also.
Applied your patch, thanks a lot. It is not working when the second splited view changes size (hide/show logs resizes only second view).
... for splitted editors ... is more broken (at least here): the actual highlighted lines (grey rectangle) get a white circle in the editors margin of the second control.
Its because the marker MiniStyledTextCtrl::GetOurMarkerNumber() is not defined as wxSCI_MARK_EMPTY. And other unused marker numbers have other visible marker settings.
A simple solution is to define all markers (0..wxSCI_MARKER_MAX] as wxSCI_MARKER_EMPTY after creation of cbStyledTextCtrl (in cbEditor). like this:
Index: cbeditor.cpp
===================================================================
--- cbeditor.cpp (revision 9855)
+++ cbeditor.cpp (working copy)
@@ -782,6 +782,7 @@
m_pControl->SetMarginMask(C_MARKER_MARGIN, 0);
m_pControl->SetMarginMask(C_CHANGEBAR_MARGIN, 0);
m_pControl->SetMarginMask(C_FOLDING_MARGIN, 0);
+ InitMarker(m_pControl);
SetEditorStyleBeforeFileOpen();
m_IsOK = Open();
@@ -797,6 +798,13 @@
}
ConnectEvents(m_pControl);
}
+void cbEditor::InitMarker(cbStyledTextCtrl* control)
+{
+ if(!control)
+ return;
+ for (int marker = 0 ; marker <= wxSCI_MARKER_MAX ; ++marker)
+ control->MarkerDefine(marker, wxSCI_MARK_EMPTY);
+}
void cbEditor::NotifyPlugins(wxEventType type, int intArg, const wxString& strArg, int xArg, int yArg)
{
@@ -1095,6 +1103,7 @@
// create the right control
m_pControl2 = CreateEditor();
+ InitMarker(m_pControl2);
// update controls' look'n'feel
// do it here (before) document is attached, speeds up syntaxhighlighting
I tried to define the marker from the MiniDoc plugin, but there I don't know when a splitted view gets created. Right?
regards