internal protected override void MousePressed(MarginMouseEventArgs args) { base.MousePressed(args); if (args.LineSegment == null) { return; } foreach (FoldSegment segment in editor.Document.GetStartFoldings(args.LineSegment)) { segment.IsFolded = !segment.IsFolded; } editor.SetAdjustments(); editor.Caret.MoveCaretBeforeFoldings(); }
internal protected override void MousePressed(MarginMouseEventArgs args) { base.MousePressed(args); if (args.LineSegment == null) { return; } var selectedSegment = GetSelectedSegment(args.LineNumber); if (selectedSegment != null) { selectedSegment.IsFolded = !selectedSegment.IsFolded; editor.SetAdjustments(); editor.Caret.MoveCaretBeforeFoldings(); } }