示例#1
0
        protected override void HandleCharactersDeletedBackwards()
        {
            string previous = text;

            text = SelectionRangeUtil.DeleteTextBackwards(text, ref selectionRange);
            HandleTextChanged(previous);
        }
示例#2
0
    public void DeleteTextRangeBackwardFromMiddle()
    {
        string text = "Keep|Delete|Keep";

        SelectionRange range = GetSelectionFromCharacters(ref text);

        string expected = "KeepKeep";
        string result   = SelectionRangeUtil.DeleteTextBackwards(text, ref range);

        Assert.AreEqual(expected, result);
        AssertSelection(result, range, "Keep|Keep");
    }
示例#3
0
    public void DeleteTextBackwardFromEnd()
    {
        string text = "KeepA|";

        SelectionRange range = GetCursorFromCharacter(ref text);

        string expected = "Keep";
        string result   = SelectionRangeUtil.DeleteTextBackwards(text, ref range);

        Assert.AreEqual(expected, result);
        AssertSelection(result, range, "Keep|");
    }