[gedit] Clear the buffer when loading
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gedit] Clear the buffer when loading
- Date: Mon, 18 Jan 2010 20:27:55 +0000 (UTC)
commit 09accded2065a8ea338a48f052e2c535bd8d1fe3
Author: Paolo Borelli <pborelli gnome org>
Date: Mon Jan 18 21:27:14 2010 +0100
Clear the buffer when loading
gedit/gedit-gio-document-loader.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-gio-document-loader.c b/gedit/gedit-gio-document-loader.c
index 80be8d6..1a44dbe 100644
--- a/gedit/gedit-gio-document-loader.c
+++ b/gedit/gedit-gio-document-loader.c
@@ -406,6 +406,9 @@ read_file_chunk (AsyncData *async)
/* Init the undoable action */
gtk_source_buffer_begin_not_undoable_action (GTK_SOURCE_BUFFER (loader->document));
gvloader->priv->started_insert = TRUE;
+
+ /* clear the buffer */
+ gtk_text_buffer_set_text (GTK_TEXT_BUFFER (loader->document), "", 0);
}
g_input_stream_read_async (G_INPUT_STREAM (gvloader->priv->stream),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]