[gnome-builder] git: set buffer line change for previous



commit 578c9efbe539d1ad8e89998abb3004721fbb48d5
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jan 27 11:49:02 2019 -0800

    git: set buffer line change for previous

 src/plugins/git/gbp-git-buffer-change-monitor.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/git/gbp-git-buffer-change-monitor.c b/src/plugins/git/gbp-git-buffer-change-monitor.c
index 04506a457..e3a9676a3 100644
--- a/src/plugins/git/gbp-git-buffer-change-monitor.c
+++ b/src/plugins/git/gbp-git-buffer-change-monitor.c
@@ -252,11 +252,16 @@ foreach_cb (gpointer data,
   IdeBufferLineChange change = 0;
 
   if (entry->mark & LINE_MARK_ADDED)
-    change = IDE_BUFFER_LINE_CHANGE_ADDED;
-  else if (entry->mark & LINE_MARK_REMOVED)
-    change = IDE_BUFFER_LINE_CHANGE_DELETED;
-  else if (entry->mark & LINE_MARK_CHANGED)
-    change = IDE_BUFFER_LINE_CHANGE_CHANGED;
+    change |= IDE_BUFFER_LINE_CHANGE_ADDED;
+
+  if (entry->mark & LINE_MARK_REMOVED)
+    change |= IDE_BUFFER_LINE_CHANGE_DELETED;
+
+  if (entry->mark & LINE_MARK_PREVIOUS_REMOVED)
+    change |= IDE_BUFFER_LINE_CHANGE_PREVIOUS_DELETED;
+
+  if (entry->mark & LINE_MARK_CHANGED)
+    change |= IDE_BUFFER_LINE_CHANGE_CHANGED;
 
   state->func (entry->line, change, state->user_data);
 }


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