void () { init("ab<caret>cde", PlainTextFileType.INSTANCE); EditorEx editorEx = (EditorEx)getEditor(); editorEx.setStickySelection(true); editorEx.getCaretModel().moveCaretRelatively(2, 0, false, false, false); SelectionModel selectionModel = editorEx.getSelectionModel(); assertEquals(2, selectionModel.getSelectionStart()); assertEquals(4, selectionModel.getSelectionEnd()); executeAction(IdeActions.ACTION_EDITOR_ESCAPE); assertFalse("sticky selection is not dropped after 'escape' action", selectionModel.hasSelection()); assertFalse(editorEx.isStickySelection()); }