[bim] Fix an off-by-one when scrolling the last line on screen

This commit is contained in:
K. Lange 2018-08-17 08:40:09 +09:00
parent 4c103806d0
commit e9e0b5141a
1 changed files with 1 additions and 1 deletions

View File

@ -1740,7 +1740,7 @@ void cursor_down(void) {
/* A new line appears on screen at the bottom, draw it */
int l = term_height - env->bottom_size - 1;
if (env->offset + l < env->line_count) {
if (env->offset + l < env->line_count + 1) {
redraw_line(l-1, env->offset + l-1);
} else {
place_cursor(1, 2 + l - 1);