Ejemplo n.º 1
0
 void IEditorOperations.MoveToNextCharacter(bool extendSelection)
 {
     if (extendSelection)
     {
         SelectionActions.MoveRight(TextEditor.GetTextEditorData());
     }
     else
     {
         CaretMoveActions.Right(TextEditor.GetTextEditorData());
     }
 }
        public void TestMoveRight()
        {
            TextEditorData data = CaretMoveActionTests.Create(@"1234567890
1234567890
1234$567890
1234567890
1234567890");

            SelectionActions.MoveRight(data);
            Assert.AreEqual(new Selection(DocumentLocation.MinLine + 2, DocumentLocation.MinColumn + 4, DocumentLocation.MinLine + 2, DocumentLocation.MinColumn + 5), data.MainSelection);
        }
Ejemplo n.º 3
0
        public void TestMoveRight()
        {
            TextEditorData data = CaretMoveActionTests.Create(@"1234567890
1234567890
1234$567890
1234567890
1234567890");

            SelectionActions.MoveRight(data);
            Assert.AreEqual(new Selection(2, 4, 2, 5), data.MainSelection);
        }