protected override void Run()
        {
            var startOffset = Editor.SelectionAnchor;

            ClipboardActions.Copy(Editor);
            Editor.Caret.Offset = startOffset;
            RequestedMode       = Mode.Normal;
        }
Example #2
0
 /// <summary>
 /// The Copy menu handler
 /// </summary>
 /// <param name="sender">The sending object</param>
 /// <param name="e">The event arguments</param>
 private void OnCopy(object sender, EventArgs e)
 {
     try
     {
         ClipboardActions.Copy(textEditor.TextArea.GetTextEditorData());
     }
     catch (Exception err)
     {
         ShowError(err);
     }
 }
        protected override void Run()
        {
            var count = Math.Min(Math.Max(Count, 1), Editor.GetLine(Editor.Caret.Line).EndOffset - Editor.Caret.Offset);

            Editor.SetSelection(Editor.Caret.Offset, Editor.Caret.Offset + count);
            ClipboardActions.Copy(Editor);
            var stuff   = ClipboardActions.GetClipboardContent();
            var swapped = new string(stuff.Select(c => char.IsLetter(c) ? char.IsUpper(c) ?
                                                  char.ToLower(c) : char.ToUpper(c) : c).ToArray());

            Editor.SetSelection(Editor.Caret.Offset, Editor.Caret.Offset + count);
            Editor.InsertAtCaret(swapped);
        }
Example #4
0
 /// <summary>
 /// The Copy menu handler
 /// </summary>
 /// <param name="sender">The sending object</param>
 /// <param name="e">The event arguments</param>
 private void OnCopy(object sender, EventArgs e)
 {
     ClipboardActions.Copy(textEditor.TextArea.GetTextEditorData());
 }
Example #5
0
 protected override void Run()
 {
     Motion.SetSelectLines(Editor, Editor.Caret.Line, Editor.Caret.Line + Count - 1);
     ClipboardActions.Copy(Editor);
     Editor.ClearSelection();
 }
 protected override void Run()
 {
     ClipboardActions.Copy(Editor);
     RequestedMode = Mode.Normal;
 }