posToRowCol ?-w win? ?-v? pos
Convert from absolute position to row and column values. It raises an error if the pos argument is out of range. The values are returned as a two-element list corresponding to the row and column indices respectively. Note that row numbers are 1-based and column numbers are 0-based.
The -v option is used to calculate virtual column values taking into account the size of the tabulations. For instance, if a line starts with a tabulation followed by a letter A, the A is at actual position (column) 1 in the row but at virtual position 4 if the tabulation size for the window is set to 4. Examples:
StringTrue colVirtual col
tab|14
A+tab|24
AB+tab|34
ABC+tab|44
ABCD+tab|58
This table indicates the true and virtual positions of the vertical bar assuming the string is at the beginning of a line and tabSize=4.