Retrieves the current position of a cursor within a text object. The position automatically adjusts as text is inserted or deleted before the cursor's original position. The cursor remembers which text object it was created for, so you only need to pass the cursor itself.
Arguments
- cursor
An
am_cursorobject created byam_cursor()- heads
Optional list of change hashes (raw vectors) to query cursor position at a historical document state. If
NULL(default), uses the current state.
Value
Integer position (0-based inter-character position) where the cursor
currently points. See am_cursor() for indexing details.