[anjuta] gtksourceview: Ignore changes that happen during a save
- From: Sebastien Granjoux <sgranjoux src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [anjuta] gtksourceview: Ignore changes that happen during a save
 
- Date: Sun, 25 Jun 2017 13:19:01 +0000 (UTC)
 
commit 9cf62549779782b67872704f68092ca6df07dae0
Author: Ove Kåven <ovek arcticnet no>
Date:   Sun Jun 25 15:11:00 2017 +0200
    gtksourceview: Ignore changes that happen during a save
    
    Stops Anjuta from nagging you with "file on disk is more recent" queries
    almost every time you save
 plugins/sourceview/sourceview-io.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/sourceview/sourceview-io.c b/plugins/sourceview/sourceview-io.c
index 323e5d7..0815b6e 100644
--- a/plugins/sourceview/sourceview-io.c
+++ b/plugins/sourceview/sourceview-io.c
@@ -181,6 +181,10 @@ static void on_file_changed (GFileMonitor* monitor,
                        GFileInfo* info;
                        const gchar* etag;
 
+                       /* Ignore changes that happen during a save. */
+                       if (sio->write_buffer)
+                               break;
+
                        info = g_file_query_info (file, G_FILE_ATTRIBUTE_ETAG_VALUE,
                                                  G_FILE_QUERY_INFO_NONE, NULL, NULL);
                        if (!info)
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]