Gtk.TextIter.prototype.get_visible_line_offset

function get_visible_line_offset():Number {
    // Gjs wrapper for gtk_text_iter_get_visible_line_offset()
}

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