commit - 77a567dda2a026ec4299236ebf99a1b422f49f40
commit + cdf1ee82f4524f73c8d1a68c387db2b1553ca899
blob - ace062682b7248cd5d8322a3af1266450df3c734
blob + 8777bbbc75b2b3fa5035abb7ca0ae962980708e5
--- tog/tog.c
+++ tog/tog.c
return view;
}
+void
+show_view(struct tog_view *view)
+{
+ show_panel(view->panel);
+ update_panels();
+}
+
const struct got_error *
view_resize(struct tog_view *view)
{
err = show_diff_view(view, obj1, obj2, repo);
close_view(view);
+ show_view(parent_view);
done:
if (obj1)
got_object_close(obj1);
}
err = show_tree_view(view, tree, entry->id, repo);
close_view(view);
+ show_view(parent_view);
done:
got_object_tree_close(tree);
return err;
err = NULL;
}
- show_panel(view->panel);
+ show_view(view);
first_displayed_entry = TAILQ_FIRST(&commits.head);
selected_entry = first_displayed_entry;
err = show_commit(view, selected_entry, repo);
if (err)
goto done;
- show_panel(view->panel);
+ show_view(view);
break;
case 't':
err = browse_commit(view, selected_entry, repo);
if (err)
goto done;
- show_panel(view->panel);
+ show_view(view);
break;
default:
break;
fflush(f);
- show_panel(view->panel);
+ show_view(view);
while (!done) {
err = draw_file(view, f, &first_displayed_line,
goto done;
SIMPLEQ_INSERT_HEAD(&blamed_commits, blamed_commit, entry);
- show_panel(view->panel);
+ show_view(view);
last_displayed_line = view->nlines;
memset(&blame, 0, sizeof(blame));
}
err = show_diff_view(diff_view, pobj, obj, repo);
close_view(diff_view);
+ show_view(view);
if (pobj) {
got_object_close(pobj);
pobj = NULL;
}
got_object_close(obj);
obj = NULL;
- show_panel(view->panel);
if (err)
break;
break;
}
static const struct got_error *
-blame_tree_entry(struct tog_view *view, struct got_tree_entry *te,
+blame_tree_entry(struct tog_view *parent_view, struct got_tree_entry *te,
struct tog_parent_trees *parents, struct got_object_id *commit_id,
struct got_repository *repo)
{
const struct got_error *err = NULL;
char *path;
+ struct tog_view *view;
err = tree_entry_path(&path, parents, te);
if (err)
return err;
- err = show_blame_view(view, path, commit_id, repo);
+ view = open_view(0, 0, 0, 0, parent_view);
+ if (view) {
+ err = show_blame_view(view, path, commit_id, repo);
+ close_view(view);
+ } else
+ err = got_error_from_errno();
+
+ show_view(parent_view);
free(path);
return err;
}
goto done;
}
- show_panel(view->panel);
+ show_view(view);
entries = got_object_tree_get_entries(root);
first_displayed_entry = SIMPLEQ_FIRST(&entries->head);
selected_entry, &parents,
commit_id, repo);
close_view(log_view);
+ show_view(view);
if (err)
goto done;
}
selected = 0;
first_displayed_entry = NULL;
} else if (S_ISREG(selected_entry->mode)) {
- struct tog_view *blame_view =
- open_view(0, 0, 0, 0, view);
- if (blame_view == NULL) {
- err = got_error_from_errno();
- goto done;
- }
- err = blame_tree_entry(blame_view,
+ err = blame_tree_entry(view,
selected_entry, &parents,
commit_id, repo);
- close_view(blame_view);
if (err)
goto done;
}