public void PreviewKeyDown() { if (CursorPosition < BackBuffer.LongCount()) { CursorPosition = FrontBuffer.LongCount() + 1; } }