commit e2c6a3b05ac5feed7250188d8852e8a7d4ab81a6
parent 76f44ef3453332cace5dffa67d8d0d8eb248d118
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Tue, 31 Mar 2020 20:50:09 +0200
reflow lines
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/scroll.c b/scroll.c
@@ -254,7 +254,9 @@ scrollup(void)
start = 1;
/* wind back bottom pointer by two pages */
- for (; bottom != NULL && TAILQ_NEXT(bottom, entries) != NULL && rows < 2 * ws.ws_row; rows++)
+ for (; bottom != NULL &&
+ TAILQ_NEXT(bottom, entries) != NULL &&
+ rows < 2 * ws.ws_row; rows++)
bottom = TAILQ_NEXT(bottom, entries);
if (rows <= ws.ws_row) {
@@ -282,7 +284,9 @@ scrolldown(char *buf, size_t size)
int rows = ws.ws_row;
/* print one page */
- for (; rows > 0 && bottom != NULL && TAILQ_PREV(bottom, tailhead, entries) != NULL; rows--) {
+ for (; rows > 0 &&
+ bottom != NULL &&
+ TAILQ_PREV(bottom, tailhead, entries) != NULL; rows--) {
bottom = TAILQ_PREV(bottom, tailhead, entries);
write(STDOUT_FILENO, bottom->buf, bottom->size);
}