summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 72d8aa7)
raw | patch | inline | side by side (parent: 72d8aa7)
author | Jonas Fonseca <fonseca@diku.dk> | |
Mon, 9 Feb 2009 03:02:33 +0000 (04:02 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Mon, 9 Feb 2009 03:02:33 +0000 (04:02 +0100) |
tig.c | patch | blob | history |
index cb6bd5d9e75b4efe523b680ad8f818e420f1e4e6..b09cbbfc513b89a9bd4701df8bed6a70eb615477 100644 (file)
--- a/tig.c
+++ b/tig.c
report("%sabling %s", *option ? "En" : "Dis", help);
}
+static void
+maximize_view(struct view *view)
+{
+ memset(display, 0, sizeof(display));
+ current_view = 0;
+ display[current_view] = view;
+ resize_display();
+ redraw_display(FALSE);
+ report("");
+}
+
+
/*
* Navigation
*/
case REQ_MAXIMIZE:
if (displayed_views() == 2)
- open_view(view, VIEW_REQ(view), OPEN_DEFAULT);
+ maximize_view(view);
break;
case REQ_TOGGLE_LINENO:
* followed. */
if (view->parent &&
view->parent->parent != view->parent) {
- memset(display, 0, sizeof(display));
- current_view = 0;
- display[current_view] = view->parent;
+ maximize_view(view->parent);
view->parent = view;
- resize_display();
- redraw_display(FALSE);
- report("");
break;
}
/* Fall-through */