[gitg] Fix assumption on line rendering data being called in order



commit 256beb52573709d99cbb180d39d2d6fa15aac8a2
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Sun Jan 17 15:47:14 2010 +0100

    Fix assumption on line rendering data being called in order
    
    This fixes weird line rendering issues when the data func is called
    to check activatability in the gutter

 gitg/gitg-diff-view.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gitg/gitg-diff-view.c b/gitg/gitg-diff-view.c
index 1c769bb..db939ac 100644
--- a/gitg/gitg-diff-view.c
+++ b/gitg/gitg-diff-view.c
@@ -617,7 +617,7 @@ line_renderer_data_func (GtkSourceGutter *gutter,
 
 	ensure_scan (view, line_number);
 
-	if (!*current)
+	if (!*current || view->priv->lines_previous_line + 1 != line_number)
 	{
 		*current = find_current_region (view, line_number);
 
@@ -630,6 +630,8 @@ line_renderer_data_func (GtkSourceGutter *gutter,
 		}
 	}
 
+	view->priv->lines_previous_line = line_number;
+
 	if (*current &&
 	    (*current)->type == GITG_DIFF_ITER_TYPE_HUNK &&
 	    line_number != (*current)->line)



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