Commit Diff


commit - 5cd2ebb1798e7ee9e1656e7bda590e0790558cd5
commit + fed614664c803c9b02ebea9b2d931f35ce1769ab
blob - 9084aee50dda572cdeb80779074c97356803eec2
blob + f4b9a5a2cee9e55fcaffae4fbeb4357b5ef3f5fb
--- ui.c
+++ ui.c
@@ -454,6 +454,9 @@ cmd_previous_line(struct tab *tab)
 static void
 cmd_next_line(struct tab *tab)
 {
+	if (tab->s->line_off + tab->s->curs_y >= tab->s->line_max)
+		return;
+
 	if (++tab->s->curs_y > body_lines-1) {
 		tab->s->curs_y = body_lines-1;
 		cmd_scroll_line_down(tab);