From 0c7a00a005c330f4ece1f577414fd624c97691ff Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 28 Apr 2008 21:05:47 +0200 Subject: [PATCH] Fix reopening blame view when it is already loading Move call to end_update() if view->pipe is non-NULL from begin_update() to open_view() so it is called also for views that defines an open() operation. Triggered by Jeff King's "show blame for parent" patch posted to the git mailing list in <20080410040213.GA29618@sigill.intra.peff.net>. --- tig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tig.c b/tig.c index 14fbf35..d96b834 100644 --- a/tig.c +++ b/tig.c @@ -2181,9 +2181,6 @@ end_update(struct view *view, bool force) static bool begin_update(struct view *view) { - if (view->pipe) - end_update(view, TRUE); - if (opt_cmd[0]) { string_copy(view->cmd, opt_cmd); opt_cmd[0] = 0; @@ -2474,6 +2471,9 @@ open_view(struct view *prev, enum request request, enum open_flags flags) (nviews == 1 && base_view != display[0])) resize_display(); + if (view->pipe) + end_update(view, TRUE); + if (view->ops->open) { if (!view->ops->open(view)) { report("Failed to load %s view", view->name); -- 2.30.2