Gtk.TextView.prototype.place_cursor_onscreen

function place_cursor_onscreen():Boolean {
    // Gjs wrapper for gtk_text_view_place_cursor_onscreen()
}

Moves the cursor to the currently visible region of the buffer, it it isn't there already.

Returns

true if the cursor had to be moved.