|
@@ -6977,5 +6977,36 @@ This is the second line.
|
|
Assert.True (_textView.WordWrap);
|
|
Assert.True (_textView.WordWrap);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ [Theory]
|
|
|
|
+ [TextViewTestsAutoInitShutdown]
|
|
|
|
+ [InlineData (Key.Delete)]
|
|
|
|
+ [InlineData (Key.DeleteChar)]
|
|
|
|
+ public void WordWrap_Draw_Typed_Keys_After_Text_Is_Deleted (Key del)
|
|
|
|
+ {
|
|
|
|
+ Application.Top.Add (_textView);
|
|
|
|
+ _textView.Text = "Line 1.\nLine 2.";
|
|
|
|
+ _textView.WordWrap = true;
|
|
|
|
+ Application.Begin (Application.Top);
|
|
|
|
+
|
|
|
|
+ Assert.True (_textView.WordWrap);
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
+Line 1.
|
|
|
|
+Line 2.", output);
|
|
|
|
+
|
|
|
|
+ Assert.True (_textView.ProcessKey (new KeyEvent (Key.End | Key.ShiftMask, new KeyModifiers () { Shift = true })));
|
|
|
|
+ Assert.Equal ("Line 1.", _textView.SelectedText);
|
|
|
|
+
|
|
|
|
+ Assert.True (_textView.ProcessKey (new KeyEvent (del, new KeyModifiers ())));
|
|
|
|
+ Application.Refresh ();
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre ("Line 2.", output);
|
|
|
|
+
|
|
|
|
+ Assert.True (_textView.ProcessKey (new KeyEvent (Key.H, new KeyModifiers ())));
|
|
|
|
+ Assert.NotEqual (Rect.Empty, _textView._needsDisplayRect);
|
|
|
|
+ Application.Refresh ();
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
+H
|
|
|
|
+Line 2.", output);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|