void (@NotNull EditorEx editor, boolean useImmediatePosition) { ThreadingAssertions.assertEventDispatchThread(); boolean vScrollAtBottom = isVScrollAtTheBottom(editor, useImmediatePosition); boolean caretAtTheLastLine = isCaretAtTheLastLine(editor); if (!vScrollAtBottom && caretAtTheLastLine) { myCancelStickToEnd = true; } }