void ActivateTabPage(TabPage tabPage)
        {
            var tabState = tabPage != null ? (TabPageController)tabPage.Tag : null;

            if (tabState != null && activeTab != tabState)
            {
                activeTab        = tabState;
                defaultActiveTab = false;
                activeTab.UpdateLineNumberMargin();
                activeTab.UpdateDirtyStatus();
                UpdateUndoStatus();
            }
        }
 private void scintilla_SavePointLeft(object sender, EventArgs e)
 {
     UpdateUndoStatus();
     activeTab.UpdateDirtyStatus();
 }