commit - d83d9d5c431189537fc94c38a85ce2b8e3217f5d
commit + c3e9aa982c53be0d0445b0f6a3b6d7e8c69d54b9
blob - 353d457f02b70f88f644afb414f0c36306d4e00c
blob + f4576eab2bb36a37be6488852d70c1e26bc4d3cd
--- tog/tog.c
+++ tog/tog.c
TOG_VIEW_BLAME,
TOG_VIEW_TREE
};
+
+#define TOG_EOF_STRING "(END)"
struct commit_queue_entry {
TAILQ_ENTRY(commit_queue_entry) entry;
static const struct got_error *
draw_file(struct tog_view *view, FILE *f, int *first_displayed_line,
int *last_displayed_line, int *eof, int max_lines,
- char * header)
+ char *header)
{
const struct got_error *err;
int nlines = 0, nprinted = 0;
*last_displayed_line = nlines;
view_vborder(view);
+
+ if (*eof) {
+ while (nprinted < view->nlines) {
+ waddch(view->window, '\n');
+ nprinted++;
+ }
+
+ err = format_line(&wline, &width, TOG_EOF_STRING, view->ncols);
+ if (err) {
+ return err;
+ }
+ wstandout(view->window);
+ waddwstr(view->window, wline);
+ wstandend(view->window);
+ }
+
return NULL;
}