예제 #1
0
 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();
 }
예제 #2
0
        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();
            }
        }