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@novell.com>2011-03-28 11:38:24 +0400
committerMike Krüger <mkrueger@novell.com>2011-03-28 11:38:24 +0400
commit9b64937f0d514694d3503622404c4e3010e203dc (patch)
tree7e35e96a2a096aff391adf5e8e66535ff129eae2 /main/tests
parenta4e5f710a20281cd544646e0386b7392b3d01829 (diff)
Fixed 'Bug 682466 - Rendering corruption and jumping in text editor'.
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/UnitTests/Mono.TextEditor.Tests/FoldingTests.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/tests/UnitTests/Mono.TextEditor.Tests/FoldingTests.cs b/main/tests/UnitTests/Mono.TextEditor.Tests/FoldingTests.cs
index b4ee06f001..cbfb390911 100644
--- a/main/tests/UnitTests/Mono.TextEditor.Tests/FoldingTests.cs
+++ b/main/tests/UnitTests/Mono.TextEditor.Tests/FoldingTests.cs
@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using NUnit.Framework;
namespace Mono.TextEditor.Tests
@@ -141,6 +142,34 @@ namespace Mono.TextEditor.Tests
Assert.AreEqual (25, document.LogicalToVisualLine (25));
}
+ /// <summary>
+ /// Bug 682466 - Rendering corruption and jumping in text editor
+ /// </summary>
+ [Test()]
+ public void TestBug682466 ()
+ {
+ Document document = new Mono.TextEditor.Document ();
+ document.Text =
+@"0
+1
+2
++[3
+4
+5
+6]
+7
+8
+9
+10";
+ var segments = GetFoldSegments (document);
+ document.UpdateFoldSegments (segments, false);
+ Assert.AreEqual (true, document.FoldSegments.FirstOrDefault ().IsFolded);
+ segments = GetFoldSegments (document);
+ segments[0].IsFolded = false;
+ document.UpdateFoldSegments (segments, false);
+ Assert.AreEqual (5, document.LogicalToVisualLine (8));
+ }
+
[Test()]
public void TestLogicalToVisualLine ()
{