Code

Blame: do to not reload the diff view for same commits
authorJonas Fonseca <fonseca@diku.dk>
Tue, 13 Jan 2009 21:48:06 +0000 (22:48 +0100)
committerJonas Fonseca <fonseca@diku.dk>
Tue, 13 Jan 2009 21:55:17 +0000 (22:55 +0100)
tig.c

diff --git a/tig.c b/tig.c
index 3189f4437aa4abaad606946e5caa9ed394dd19df..5f480cb04c4715ce13b2da17477376022f7a4039 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -3779,6 +3779,10 @@ blame_request(struct view *view, enum request request, struct line *line)
                        break;
                }
 
+               if (view_is_displayed(VIEW(REQ_VIEW_DIFF)) &&
+                   !strcmp(blame->commit->id, VIEW(REQ_VIEW_DIFF)->ref))
+                       break;
+
                if (!strcmp(blame->commit->id, NULL_ID)) {
                        char path[SIZEOF_STR];