public void TestDelete() { var data = Create(@"1234$567890"); DeleteActions.Delete(data); Check(data, @"1234$67890"); }
public void TestBackspaceDeleteCase1() { var data = Create(@"1234567890$"); DeleteActions.Delete(data); Check(data, @"1234567890$"); }
public void TestDeleteUTF32() { var data = Create(@"12$🚀34"); DeleteActions.Delete(data); Check(data, @"12$34"); }
public void TestBackspaceDeleteCase1() { TextEditorData data = CaretMoveActionTests.Create(@"1234567890$"); DeleteActions.Delete(data); Assert.AreEqual(new DocumentLocation(0, 10), data.Caret.Location); Assert.AreEqual("1234567890", data.Document.Text); }
public void TestSmartDeleteBehaviorBug1() { var data = CreateData("\n\t\tFoo\n\t\t Bar"); data.Caret.Location = new DocumentLocation(2, 6); DeleteActions.Delete(data); Assert.AreEqual(new DocumentLocation(2, 6), data.Caret.Location); Assert.AreEqual("\n\t\tFooBar", data.Document.Text); }
public void TestDelete() { TextEditorData data = CaretMoveActionTests.Create(@"1234$567890"); Assert.AreEqual(new DocumentLocation(0, 4), data.Caret.Location); DeleteActions.Delete(data); Assert.AreEqual(new DocumentLocation(0, 4), data.Caret.Location); Assert.AreEqual("123467890", data.Document.Text); }
public void TestBug5067() { var data = CreateData("\n\n\t\tFoo ();\n"); data.Caret.Location = new DocumentLocation(2, 3); SelectionActions.MoveDown(data); DeleteActions.Delete(data); Assert.AreEqual("\n\t\tFoo ();\n", data.Document.Text); }
public void TestDeleteBehavior() { var data = CreateData("\n\t\ttest"); data.Caret.Location = new DocumentLocation(2, 3); CaretMoveActions.Up(data); Assert.AreEqual(new DocumentLocation(1, 3), data.Caret.Location); DeleteActions.Delete(data); Assert.AreEqual("\t\ttest", data.Document.Text); }
/// <summary> /// The Delete menu handler /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> private void OnDelete(object sender, EventArgs e) { try { DeleteActions.Delete(textEditor.TextArea.GetTextEditorData()); } catch (Exception err) { ShowError(err); } }
public void TestDeleteSelectionBehavior() { var data = CreateData("\n\t\ttest\n\n"); data.Caret.Location = new DocumentLocation(2, 3); SelectionActions.MoveUp(data); Assert.AreEqual(new DocumentLocation(1, 3), data.Caret.Location); Assert.IsTrue(data.IsSomethingSelected); DeleteActions.Delete(data); Assert.AreEqual(new DocumentLocation(1, 3), data.Caret.Location); Assert.AreEqual("\t\ttest\n\n", data.Document.Text); }
protected override void Run() { if (Char.IsControl(Argument)) { return; } Editor.SetSelection(Editor.Caret.Offset, Editor.Caret.Offset + 1); DeleteActions.Delete(Editor); Editor.InsertAtCaret(Char.ToString(Argument)); Editor.Caret.Offset--; }
public void TestDeleteNoUpdate() { var editor = new MonoTextEditor(); editor.GetTextEditorData().Document.SyntaxMode = new TestSyntaxMode(); editor.Text = @"1 2 3 4 5"; editor.Caret.Location = new DocumentLocation(2, 1); DeleteActions.Delete(editor.GetTextEditorData()); Assert.IsFalse(editor.TextViewMargin.SpanUpdater.HasUpdatedMultilineSpan); }
public void TestDelete() { var data = Create( @"1234567890 1234<-567890 1234567890 1234567890 1234->$567890 1234567890"); data.MainSelection = data.MainSelection.WithSelectionMode(SelectionMode.Block); DeleteActions.Delete(data); Check(data, @"1234567890 1234<-67890 123467890 123467890 1234->$67890 1234567890"); }
/// <summary> /// The Delete menu handler /// </summary> /// <param name="sender">The sending object</param> /// <param name="e">The event arguments</param> private void OnDelete(object sender, EventArgs e) { DeleteActions.Delete(textEditor.TextArea.GetTextEditorData()); }