diff options
-rw-r--r-- | more.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -169,7 +169,9 @@ static int more_printline(char *s) static void more_refresh(struct more_file *mf) { int printed = 0; - for (size_t i = 0; i + printed < mf->topline + LINES; i++) { + wmove(more_win, 0, 0); + + for (size_t i = mf->topline; i + printed < mf->topline + LINES; i++) { /* FIXME: account for long lines */ if (more_getline(mf, i) == -1) { @@ -185,7 +187,7 @@ static void more_scroll(struct more_file *mf, int count, int multiple) { int by = count ? count * multiple : multiple; - if (more_clear) { + if (more_clear && abs(by) > LINES) { clear(); } |