protected static boolean isStickingToEnd(@NotNull EditorEx editor) {
    return isCaretAtTheLastLine(editor) ||
           isVScrollAtTheBottom(editor, true);
  }
protected static boolean isStickingToEnd(@NotNull EditorEx editor)