void DocumentChanged(object sender, DocumentEventArgs e) { int oldCount = _foldMarker.Count; _document.UpdateSegmentListOnDocumentChange(_foldMarker, e); if (oldCount != _foldMarker.Count) { _document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); } }