void () { if (myMouseSelectionState != MOUSE_SELECTION_STATE_WORD_SELECTED) return; Caret caret = getCaretModel().getCurrentCaret(); mySavedSelectionStart = caret.getSelectionStart(); mySavedSelectionEnd = caret.getSelectionEnd(); caret.moveToOffset(mySavedSelectionEnd); }