Code

Fix stage reloading to not close when staging chunks from group diff
authorJonas Fonseca <fonseca@diku.dk>
Wed, 21 Jan 2009 22:14:17 +0000 (23:14 +0100)
committerJonas Fonseca <fonseca@diku.dk>
Wed, 21 Jan 2009 22:15:17 +0000 (23:15 +0100)
tig.c

diff --git a/tig.c b/tig.c
index 79b23e01ba78784573f2c5d2e564068c0b689089..6b0aa08dfbd965f278820ba6247ded6f1d3b2e25 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -4533,8 +4533,11 @@ status_exists(struct status *status, enum line_type type)
        for (line = view->line; line < view->line + view->lines; line++) {
                struct status *pos = line->data;
 
-               if (line->type == type && pos &&
-                   !strcmp(status->new.name, pos->new.name))
+               if (line->type != type)
+                       continue;
+               if (!pos && (!status || !status->status))
+                       return TRUE;
+               if (pos && !strcmp(status->new.name, pos->new.name))
                        return TRUE;
        }