From 2478dc95f56c67eb3aad3cfd117b4a85d7e071c1 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 21 Jan 2009 23:14:17 +0100 Subject: [PATCH] Fix stage reloading to not close when staging chunks from group diff --- tig.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tig.c b/tig.c index 79b23e0..6b0aa08 100644 --- 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; } -- 2.30.2