Gtk.TextIter.prototype.get_visible_line_index

function get_visible_line_index():Number {
    // Gjs wrapper for gtk_text_iter_get_visible_line_index()
}

Returns the number of bytes from the start of the line to the given iter, not counting bytes that are invisible due to tags with the "invisible" flag toggled on.

Returns

byte index of iter with respect to the start of the line