示例#1
0
 public void InsertThenDeletePastEndOfOriginalBuffer()
 {
     Create("cat");
     _insertUtilRaw.ApplyTextChange(
         TextChange.NewCombination(
             TextChange.NewInsert("trucker"),
             TextChange.NewDeleteRight(3)),
         addNewLines: false);
     Assert.Equal("trucker", _textBuffer.GetLine(0).GetText());
     Assert.Equal(7, _textView.GetCaretPoint().Position);
 }
示例#2
0
 public void ReplaceBig()
 {
     Create("cat");
     _insertUtilRaw.ApplyTextChange(
         TextChange.NewCombination(
             TextChange.NewCombination(
                 TextChange.NewDeleteRight(1),
                 TextChange.NewInsert("b")),
             TextChange.NewCombination(
                 TextChange.NewDeleteRight(1),
                 TextChange.NewInsert("i"))),
         addNewLines: false);
     Assert.Equal("bit", _textBuffer.GetLine(0).GetText());
 }