Commit 1831ac029c57d391f90a06e6aaf7f30e6b855ff7

Christian Weisgerber 2020-03-23T16:39:24

Subtract the status line from the number of lines to page up/down in the log view. ok stsp@

diff --git a/tog/tog.c b/tog/tog.c
index aa1595f..76812bc 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -2273,7 +2273,7 @@ input_log_view(struct tog_view **new_view, struct tog_view **dead_view,
 			break;
 		}
 		scroll_up(view, &s->first_displayed_entry,
-		    view->nlines, &s->commits);
+		    view->nlines - 1, &s->commits);
 		break;
 	case 'j':
 	case KEY_DOWN:
@@ -2299,7 +2299,7 @@ input_log_view(struct tog_view **new_view, struct tog_view **dead_view,
 		if (first == NULL)
 			break;
 		err = scroll_down(view, &s->first_displayed_entry,
-		    view->nlines, &s->last_displayed_entry,
+		    view->nlines - 1, &s->last_displayed_entry,
 		    &s->commits, &s->thread_args.log_complete,
 		    &s->thread_args.commits_needed,
 		    &s->thread_args.need_commits);