Factored out CaretPosition SelectionRange().