From 7d6524c0114504986503a903a16b2fe1616edd9e Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Mon, 21 Dec 2015 22:38:25 +0100 Subject: [PATCH] Do not color removed/added when nothing removed and nothing added --- libgitg/gitg-diff-stat.vala | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libgitg/gitg-diff-stat.vala b/libgitg/gitg-diff-stat.vala index 6a59989c..f7fcb5a1 100644 --- a/libgitg/gitg-diff-stat.vala +++ b/libgitg/gitg-diff-stat.vala @@ -158,8 +158,13 @@ public class Gitg.DiffStat : Gtk.DrawingArea x -= padding.right + wbar; } - if (added == 0 || - removed == 0) + if (added == 0 && removed == 0) + { + sctx.save(); + sctx.render_background(context, x, ybar, wrest, hbar); + sctx.restore(); + } + else if (added == 0 || removed == 0) { sctx.save(); sctx.add_class(added == 0 ? "removed-only" : "added-only");