Code

Improve viewing of diffs when browsing branches
authorJonas Fonseca <fonseca@diku.dk>
Sun, 26 Sep 2010 22:23:05 +0000 (18:23 -0400)
committerJonas Fonseca <fonseca@diku.dk>
Sun, 26 Sep 2010 22:23:05 +0000 (18:23 -0400)
NEWS
tig.c

diff --git a/NEWS b/NEWS
index e4e5f585f1df57fdcb21920891696c7225944951..0926f669d53c7f3a03823f07a2ce01f04bf33597 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,13 @@
 Release notes
 =============
 
+tig master
+----------
+
+Bug fixes:
+
+ - Fix opening of diffs when browsing branches.
+
 tig-0.16.2
 ----------
 
diff --git a/tig.c b/tig.c
index 37a779cadea5d7abc85a55d8d40de453e1db9683..80c4d7a6c7994725092b0aec0dd644f3a5ea4df4 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -6942,6 +6942,8 @@ main_request(struct view *view, enum request request, struct line *line)
 
        switch (request) {
        case REQ_ENTER:
+               if (view_is_displayed(view) && display[0] != view)
+                       maximize_view(view);
                open_view(view, REQ_VIEW_DIFF, flags);
                break;
        case REQ_REFRESH: