Skip to content

Commit

Permalink
[GH #83] WIP: main view lazy navigation mode prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas committed Aug 30, 2012
1 parent 9e09e02 commit 70ee06f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tig.c
Original file line number Diff line number Diff line change
Expand Up @@ -3228,7 +3228,7 @@ static void
split_view(struct view *prev, struct view *view)
{
display[1] = view;
current_view = 1;
current_view = 0;
view->parent = prev;
resize_display();

Expand Down Expand Up @@ -7296,6 +7296,14 @@ main_request(struct view *view, enum request request, struct line *line)
break;
}

if (displayed_views() == 2) {
struct view *diff = VIEW(REQ_VIEW_DIFF);

if (view_is_displayed(diff) && !strcmp(diff->vid, diff->id)) {
view_request(VIEW(REQ_VIEW_DIFF), request);
break;
}
}
open_view(view, REQ_VIEW_DIFF, flags);
break;
case REQ_REFRESH:
Expand Down

0 comments on commit 70ee06f

Please sign in to comment.