[gtksourceview] Mark as user actions undo and redo
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Mark as user actions undo and redo
- Date: Fri, 18 Jan 2013 19:12:31 +0000 (UTC)
commit 0f97d9435c266ab9688ed4ae537b9a685b2cb4b4
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date: Fri Jan 18 20:11:56 2013 +0100
Mark as user actions undo and redo
gtksourceview/gtksourceundomanagerdefault.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourceundomanagerdefault.c b/gtksourceview/gtksourceundomanagerdefault.c
index e5071f6..34860b0 100644
--- a/gtksourceview/gtksourceundomanagerdefault.c
+++ b/gtksourceview/gtksourceundomanagerdefault.c
@@ -510,7 +510,10 @@ insert_text (GtkTextBuffer *buffer,
GtkTextIter iter;
gtk_text_buffer_get_iter_at_offset (buffer, &iter, pos);
+
+ gtk_text_buffer_begin_user_action (buffer);
gtk_text_buffer_insert (buffer, &iter, text, len);
+ gtk_text_buffer_end_user_action (buffer);
}
static void
@@ -528,7 +531,9 @@ delete_text (GtkTextBuffer *buffer,
else
gtk_text_buffer_get_iter_at_offset (buffer, &end_iter, end);
+ gtk_text_buffer_begin_user_action (buffer);
gtk_text_buffer_delete (buffer, &start_iter, &end_iter);
+ gtk_text_buffer_end_user_action (buffer);
}
static gchar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]