Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2013-10-29 10:06:37 +0400
committerMike Krüger <mkrueger@xamarin.com>2013-10-29 10:06:56 +0400
commit46af0b4759116709dc6ecd78998a055c63f64a1e (patch)
tree2a56ff0ecb93aa9d305bdfcf43ba5e794d4de02f /main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/VirtualIndentModeTests.cs
parent2349fbd0d7199ec23213f5c08967c68ee02c36b4 (diff)
Fixed 'Bug 15476 - Cursor is getting stuck when deleting last empty
line with indents '.
Diffstat (limited to 'main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/VirtualIndentModeTests.cs')
-rw-r--r--main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/VirtualIndentModeTests.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/VirtualIndentModeTests.cs b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/VirtualIndentModeTests.cs
index 8c62fbc7ab..a163c4dcec 100644
--- a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/VirtualIndentModeTests.cs
+++ b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/VirtualIndentModeTests.cs
@@ -442,6 +442,28 @@ namespace Mono.TextEditor.Tests
Assert.AreEqual (new DocumentLocation (2, 3), data.MainSelection.Anchor);
}
+
+ /// <summary>
+ /// Bug 15476 - Cursor is getting stuck when deleting last empty line with indents
+ /// </summary>
+ [Test]
+ public void TestBug15476 ()
+ {
+ var data = CreateData ("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n\t\t\r\n\r\n");
+ data.Options.DefaultEolMarker = "\r\n";
+ data.IndentationTracker = new DefaultIndentationTracker (data.Document);
+ data.Caret.Location = new DocumentLocation (4, 3);
+
+ DeleteActions.Backspace (data);
+ Assert.AreEqual (new DocumentLocation (4, 2), data.Caret.Location);
+ DeleteActions.Backspace (data);
+ Assert.AreEqual (new DocumentLocation (4, 1), data.Caret.Location);
+
+ DeleteActions.Backspace (data);
+ Assert.AreEqual (new DocumentLocation (3, 3), data.Caret.Location);
+
+ }
+
}
}