Fix updating of the main view title when the screen isn't split
authorJonas Fonseca <fonseca@diku.dk>
Sun, 21 May 2006 23:18:13 +0000 (01:18 +0200)
committerJonas Fonseca <fonseca@antimatter.localdomain>
Sun, 21 May 2006 23:18:13 +0000 (01:18 +0200)
tig.c

diff --git a/tig.c b/tig.c
index 236c701..4abb0bf 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -1297,13 +1297,13 @@ open_view(struct view *prev, enum request request, enum open_flags flags)
        }
 
        if (prev && view != prev) {
-               /* "Blur" the previous view. */
-               if (!backgrounded)
-                       update_view_title(prev);
-
                /* Continue loading split views in the background. */
                if (!split)
                        end_update(prev);
+               else if (!backgrounded)
+                       /* "Blur" the previous view. */
+                       update_view_title(prev);
+
                view->parent = prev;
        }
 
@@ -1367,11 +1367,12 @@ view_driver(struct view *view, enum request request)
 
                if (view == VIEW(REQ_VIEW_DIFF) &&
                    view->parent == VIEW(REQ_VIEW_MAIN)) {
-                       bool redraw = display[0] == VIEW(REQ_VIEW_MAIN);
+                       bool redraw = display[1] == view;
 
                        view = view->parent;
                        move_view(view, request, redraw);
-                       update_view_title(view);
+                       if (redraw)
+                               update_view_title(view);
                } else {
                        move_view(view, request, TRUE);
                        break;