### Method

# Gtk TextBuffer set_enable_undo

#### Declaration [src]

    void
    gtk_text_buffer_set_enable_undo (
      GtkTextBuffer* buffer,
      gboolean enable_undo
    )

#### Description [src]

Sets whether or not to enable undoable actions in the text buffer.

Undoable actions in this context are changes to the text content of the buffer. Changes to tags and marks are not tracked.

If enabled, the user will be able to undo the last number of actions up to `gtk_text_buffer_get_max_undo_levels()`.

See `gtk_text_buffer_begin_irreversible_action()` and `gtk_text_buffer_end_irreversible_action()` to create changes to the buffer that cannot be undone.

Sets property | `Gtk.TextBuffer:enable-undo`

#### Parameters

`enable_undo`

  Type: `gboolean`

  `TRUE` to enable undo.