protected override void HandleCharactersDeletedBackwards() { string previous = text; text = SelectionRangeUtil.DeleteTextBackwards(text, ref selectionRange); HandleTextChanged(previous); }
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"); }
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|"); }