commit - e54cc94af2217992a549a0ae0cf2d38314120297
commit + 135a2da0c5bd18fcf65ac142fa604ec03ad1aa2d
blob - 07b0a442edfa8fd3776c4eb050a1d641afb97232
blob + 7b48924a0835e067b5b49dc74d78a60a76d928d4
--- tog/tog.c
+++ tog/tog.c
werase(view->window);
if (header) {
- err = format_line(&wline, &width, header, view->ncols, 0);
- if (err) {
+ if (asprintf(&line, "[%d/%d] %s",
+ first_displayed_line - 1 + selected_line, nlines,
+ header) == -1)
+ return got_error_from_errno("asprintf");
+ err = format_line(&wline, &width, line, view->ncols, 0);
+ free(line);
+ if (err)
return err;
- }
if (view_needs_focus_indication(view))
wstandout(view->window);