[gtk/test-text-buffer-undo: 11/11] textbuffer: Add some docs for undo




commit dcc38207ce1abd239e2bcf1078ffa808f306f47e
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed May 26 14:20:39 2021 -0400

    textbuffer: Add some docs for undo
    
    Mention what is undoable and what isn't.

 gtk/gtktextbuffer.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index f628598bb6..dedccc0134 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -49,6 +49,9 @@
  * [text widget conceptual overview](section-text-widget.html),
  * which gives an overview of all the objects and data types
  * related to the text widget and how they work together.
+ *
+ * GtkTextBuffer can support undoing changes to the buffer
+ * content, see [method@Gtk.TextBuffer.set_enable_undo].
  */
 
 typedef struct _GtkTextLogAttrCache GtkTextLogAttrCache;
@@ -4983,6 +4986,9 @@ gtk_text_buffer_get_enable_undo (GtkTextBuffer *buffer)
  *
  * 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 [method@Gtk.TextBuffer.get_max_undo_levels].
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]