[anjuta] sourceview: mark clearing of buffer as a not undoable action



commit bd0bb908a045e01b643142c1fa8c331aa91489e2
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Sun Feb 10 21:02:54 2013 +0100

    sourceview: mark clearing of buffer as a not undoable action
    
    when opening a file in ifile_open

 plugins/sourceview/sourceview.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/sourceview/sourceview.c b/plugins/sourceview/sourceview.c
index b387b86..0497388 100644
--- a/plugins/sourceview/sourceview.c
+++ b/plugins/sourceview/sourceview.c
@@ -992,9 +992,13 @@ ifile_open (IAnjutaFile* ifile, GFile* file, GError** e)
 
 	/* Hold a reference here to avoid a destroyed editor */
 	g_object_ref(G_OBJECT(sv));
+
+	gtk_source_buffer_begin_not_undoable_action (GTK_SOURCE_BUFFER (sv->priv->document));
 	gtk_text_buffer_set_text (GTK_TEXT_BUFFER(sv->priv->document),
 							  "",
 							  0);
+	gtk_source_buffer_end_not_undoable_action (GTK_SOURCE_BUFFER (sv->priv->document));
+
 	gtk_text_view_set_editable (GTK_TEXT_VIEW (sv->priv->view),
 								FALSE);
 	sv->priv->loading = TRUE;


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