TextIter.getVisibleLineOffset

int getVisibleLineOffset()

Returns the offset in characters from the start of the line to the given iter, not counting characters that are invisible due to tags with the “invisible” flag toggled on.

Returns

offset in visible characters from the start of the line