`getCurrentState`: Don't get selection--get only the range, if exists.
Add missing priod in code comment.