[gnome-builder] history: ignore jumps while buffer is loading



commit 3466ed622fd21dbdcbbe7f30c88f1dcbfddc7e39
Author: Christian Hergert <chergert redhat com>
Date:   Mon Sep 17 11:45:33 2018 -0700

    history: ignore jumps while buffer is loading

 src/plugins/history/gbp-history-editor-view-addin.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/history/gbp-history-editor-view-addin.c 
b/src/plugins/history/gbp-history-editor-view-addin.c
index f81dc9220..aa8195bed 100644
--- a/src/plugins/history/gbp-history-editor-view-addin.c
+++ b/src/plugins/history/gbp-history-editor-view-addin.c
@@ -186,7 +186,8 @@ gbp_history_editor_view_addin_insert_text (GbpHistoryEditorViewAddin *self,
   g_assert (location != NULL);
   g_assert (text != NULL);
 
-  gbp_history_editor_view_addin_queue (self, gtk_text_iter_get_line (location));
+  if (!ide_buffer_get_loading (buffer))
+    gbp_history_editor_view_addin_queue (self, gtk_text_iter_get_line (location));
 }
 
 static void
@@ -200,7 +201,8 @@ gbp_history_editor_view_addin_delete_range (GbpHistoryEditorViewAddin *self,
   g_assert (end != NULL);
   g_assert (IDE_IS_BUFFER (buffer));
 
-  gbp_history_editor_view_addin_queue (self, gtk_text_iter_get_line (begin));
+  if (!ide_buffer_get_loading (buffer))
+    gbp_history_editor_view_addin_queue (self, gtk_text_iter_get_line (begin));
 }
 
 static void


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