Esempio n. 1
0
        public void TestEmptyLineSelectionBehaviorMoveDown()
        {
            var data = CreateData("\n\n\n");

            data.Caret.Location = new DocumentLocation(2, 3);
            SelectionActions.MoveDown(data);
            Assert.AreEqual(new DocumentLocation(3, 3), data.Caret.Location);
            Assert.AreEqual(new DocumentLocation(3, 3), data.MainSelection.Lead);
            Assert.AreEqual(new DocumentLocation(2, 3), data.MainSelection.Anchor);
        }
Esempio n. 2
0
        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);
        }
 void IEditorOperations.MoveLineDown(bool extendSelection)
 {
     if (extendSelection)
     {
         SelectionActions.MoveDown(TextEditor.GetTextEditorData());
     }
     else
     {
         CaretMoveActions.Down(TextEditor.GetTextEditorData());
     }
 }
        public void TestMoveDown()
        {
            TextEditorData data = CaretMoveActionTests.Create(@"1234567890
1234567890
1234$567890
1234567890
1234567890");

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

            SelectionActions.MoveDown(data);
            Assert.AreEqual(new Selection(2, 4, 3, 4), data.MainSelection);
        }