public void MoveSelectionLeft() { if (IsEmpty) { return; } Begin = End = PrintedTokens .Select(t => t.Token.Index) .Where(F.IsLessThan(End)) .DefaultIfEmpty(0) .Last(); onChanged(); }
public void MoveSelectionRight() { if (IsEmpty) { return; } Begin = End = PrintedTokens .Select(t => t.Token.Index + t.Token.Length) .Where(F.IsGreaterThan(End)) .DefaultIfEmpty(Text.Length) .First(); onChanged(); }