private void gotoPrevSentence() { var sentence = getPreviousSentence(); if (sentence != null) { setCaretPosAndSelect(sentence.Start, sentence.Length); } }