From: Jonas Fonseca Date: Tue, 7 Oct 2008 18:43:24 +0000 (+0200) Subject: Avoid triggering assertion failure when reloading the status view X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=58fc3b1db70f52badd3cd9d88773107e3201469d;p=tig.git Avoid triggering assertion failure when reloading the status view After staging a diff chunk, the stage view automatically reloads the status view. If the staging happened while the status view is not displayed an assertion failure is triggered by draw_view_line(). Fix it by only conditionally redrawing the view in open_view(). --- diff --git a/tig.c b/tig.c index 51cbb20..e64d72a 100644 --- a/tig.c +++ b/tig.c @@ -2536,7 +2536,7 @@ open_view(struct view *prev, enum request request, enum open_flags flags) * the screen. */ werase(view->win); report(""); - } else { + } else if (view_is_displayed(view)) { redraw_view(view); report(""); }