protected void OnCopy(object target, ExecutedRoutedEventArgs args) { if (target != textEditor.textArea) { return; } if (textEditor.SelectionLength == 0 && executing) { // Send the 'Ctrl-C' abort //if (!IsInReadOnlyRegion) //{ MoveToHomePosition(); //textEditor.Column = GetLastTextEditorLine().Length + 1; //textEditor.Write(Environment.NewLine); //} dispatcherThread.Abort(new Microsoft.Scripting.KeyboardInterruptException("")); args.Handled = true; } else { PythonEditingCommandHandler.OnCopy(target, args); } }
private void OnCopy(object target, ExecutedRoutedEventArgs args) { if (target != _textEditor.TextArea) { return; } if (_textEditor.SelectionLength == 0 && Executing) { // Send the 'Ctrl-C' abort //if (!IsInReadOnlyRegion) //{ MoveToHomePosition(); //textEditor.Column = GetLastTextEditorLine().Length + 1; //textEditor.Write(Environment.NewLine); //} AbortRunningScript(); args.Handled = true; } else { PythonEditingCommandHandler.OnCopy(target, args); } }