commit a026b947176c52261534aa3ad22bdaa6dd10b482 from: Stefan Sperling date: Thu Jul 12 21:19:04 2018 UTC don't sroll beyond end of file in tog blame view commit - 030916b54bfd04eea2d42ea496a643df1bd4bf3b commit + a026b947176c52261534aa3ad22bdaa6dd10b482 blob - 9e3a9cbf0d2cf82a11dd3393a4bd18153d435cb6 blob + 66fdd7efeddd00b762c51e3653d459df829f40b3 --- tog/tog.c +++ tog/tog.c @@ -1557,7 +1557,9 @@ show_blame_view(const char *path, struct got_object_id break; case 'j': case KEY_DOWN: - if (selected_line < LINES - 2) + if (selected_line < LINES - 2 && + first_displayed_line + selected_line <= + blame.nlines) selected_line++; else if (last_displayed_line < blame.nlines) first_displayed_line++;