Commit Diff


commit - cc3c9aac74c52266b5bfd68dbc942f539e3634c7
commit + 842167bf7e193c14bfd2cf252f5798dbf5808198
blob - 4688ed6d8f3dd0e133723353d0f6b9e6e67a0665
blob + c0bad352ab94e336f2a65e5b084716396d6f3ddf
--- tog/tog.c
+++ tog/tog.c
@@ -109,14 +109,14 @@ close_view(struct tog_view *view)
 }
 
 static struct tog_view *
-open_view(void)
+open_view(int nlines, int ncols, int begin_y, int begin_x)
 {
 	struct tog_view *view = malloc(sizeof(*view));
 
 	if (view == NULL)
 		return NULL;
 
-	view->window = newwin(0, 0, 0, 0);
+	view->window = newwin(nlines, ncols, begin_y, begin_x);
 	if (view->window == NULL) {
 		close_view(view);
 		return NULL;
@@ -698,7 +698,7 @@ show_commit(struct commit_queue_entry *entry, struct g
 			goto done;
 	}
 
-	view = open_view();
+	view = open_view(0, 0, 0, 0);
 	if (view == NULL) {
 		err = got_error_from_errno();
 		goto done;
@@ -780,7 +780,7 @@ show_log_view(struct got_object_id *start_id, struct g
 		err = NULL;
 	}
 
-	view = open_view();
+	view = open_view(0, 0, 0, 0);
 	if (view == NULL) {
 		err = got_error_from_errno();
 		goto done;
@@ -1190,7 +1190,7 @@ cmd_diff(int argc, char *argv[])
 	if (error)
 		goto done;
 
-	view = open_view();
+	view = open_view(0, 0, 0, 0);
 	if (view == NULL) {
 		error = got_error_from_errno();
 		goto done;
@@ -1635,7 +1635,7 @@ show_blame_view(const char *path, struct got_object_id
 		goto done;
 	SIMPLEQ_INSERT_HEAD(&blamed_commits, blamed_commit, entry);
 
-	view = open_view();
+	view = open_view(0, 0, 0, 0);
 	if (view == NULL) {
 		err = got_error_from_errno();
 		goto done;
@@ -1796,7 +1796,7 @@ show_blame_view(const char *path, struct got_object_id
 					break;
 				if (pobj == NULL && obj == NULL)
 					break;
-				diff_view = open_view();
+				diff_view = open_view(0, 0, 0, 0);
 				if (diff_view == NULL) {
 					err = got_error_from_errno();
 					break;
@@ -2199,7 +2199,7 @@ show_tree_view(struct got_tree_object *root, struct go
 		goto done;
 	}
 
-	view = open_view();
+	view = open_view(0, 0, 0, 0);
 	if (view == NULL) {
 		err = got_error_from_errno();
 		goto done;