[gnome-builder/wip/slaf/xml-symbol-resolver: 21/25] diagnostics: fix the sequence update



commit 477a514bb040b7f646c34fd441c890b2633f209d
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Mon Feb 6 19:41:06 2017 +0100

    diagnostics: fix the sequence update
    
    The sequence number for a file is imcremented each time
    we request diagnostics, that is each time the buffer changes.
    
    Currently, we wait for all diagnostics providers to finish
    their task before incrementing the sequence, but we notify
    a change after each providers task is finished.
    
    This lead to the following problem:
    
    we can trigger a change without sequence incrementation,
    then with the next providers, increment the sequence
    but we don't trigger a change.
    
    The result is that the diagnostics in the view are not up to date.
    
    We fix that by incrementing the sequence after each provider's
    task is finished.

 libide/diagnostics/ide-diagnostics-manager.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/libide/diagnostics/ide-diagnostics-manager.c b/libide/diagnostics/ide-diagnostics-manager.c
index ab7e0d6..0b94963 100644
--- a/libide/diagnostics/ide-diagnostics-manager.c
+++ b/libide/diagnostics/ide-diagnostics-manager.c
@@ -368,8 +368,7 @@ ide_diagnostics_group_diagnose_cb (GObject      *object,
    * reported. This ensures that the gutter gets cleared and line-flags
    * cache updated.
    */
-  if (group->in_diagnose == 0)
-    group->sequence++;
+  group->sequence++;
 
   /*
    * Since the individual groups have sequence numbers associated with changes,


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