Gtk.TextBuffer.prototype.end_user_action

function end_user_action():void {
    // Gjs wrapper for gtk_text_buffer_end_user_action()
}

Should be paired with a call to Gtk.TextBuffer.prototype.begin_user_action. See that function for a full explanation.