From: Jonas Fonseca Date: Wed, 21 Jan 2009 22:14:17 +0000 (+0100) Subject: Fix stage reloading to not close when staging chunks from group diff X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2478dc95f56c67eb3aad3cfd117b4a85d7e071c1;p=tig.git Fix stage reloading to not close when staging chunks from group diff --- 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; }