int (@NotNull Editor editor) { CaretModel caretModel = editor.getCaretModel(); int caretOffset = caretModel.getOffset(); LogicalPosition logicalPosition = caretModel.getLogicalPosition(); VisualPosition visualPosition = caretModel.getVisualPosition(); return calcAfterLineEnd(editor, caretOffset, logicalPosition, visualPosition); }