void (@NotNull CaretEvent e) { if (myState.isStickySelection()) { int selectionStart = Math.min(myStickySelectionStart, getDocument().getTextLength()); mySelectionModel.setSelection(selectionStart, myCaretModel.getVisualPosition(), myCaretModel.getOffset()); } }