Gtk.TextBuffer.prototype.get_modified

function get_modified():Boolean {
    // Gjs wrapper for gtk_text_buffer_get_modified()
}

Indicates whether the buffer has been modified since the last call to Gtk.set_modified set the modification flag to false. Used for example to enable a "save" function in a text editor.

Returns

true if the buffer has been modified