public void Repeat1()
 {
     Create("dog again", "cat again", "chicken");
     EnterMode(ModeKind.VisualLine, _textView.GetLineRange(0, 1).ExtentIncludingLineBreak);
     _buffer.Settings.GlobalSettings.ShiftWidth = 2;
     _buffer.Process(">.");
     Assert.AreEqual("    dog again", _textView.GetLine(0).GetText());
 }
Beispiel #2
0
 public void Change_LineWise()
 {
     Create("cat", "  dog", "  bear", "tree");
     EnterMode(ModeKind.VisualLine, _textView.GetLineRange(1, 2).ExtentIncludingLineBreak);
     _buffer.LocalSettings.AutoIndent = true;
     _buffer.Process("c");
     Assert.AreEqual("cat", _textView.GetLine(0).GetText());
     Assert.AreEqual("", _textView.GetLine(1).GetText());
     Assert.AreEqual("tree", _textView.GetLine(2).GetText());
     Assert.AreEqual(2, _textView.Caret.Position.VirtualBufferPosition.VirtualSpaces);
     Assert.AreEqual(_textView.GetLine(1).Start, _textView.GetCaretPoint());
     Assert.AreEqual(ModeKind.Insert, _buffer.ModeKind);
 }