Code

Do not terminate the update when switching back to a loading view
[tig.git] / tig.c
diff --git a/tig.c b/tig.c
index f34334ce7e15682850669743923f75d1c7900fd7..79b23e01ba78784573f2c5d2e564068c0b689089 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2622,6 +2622,9 @@ prepare_update_file(struct view *view, const char *name)
 static bool
 begin_update(struct view *view, bool refresh)
 {
+       if (view->pipe)
+               end_update(view, TRUE);
+
        if (refresh) {
                if (!start_io(&view->io))
                        return FALSE;
@@ -2855,9 +2858,6 @@ 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);