Parcourir la source

Fix line length

Jochen Sprickerhof il y a 5 ans
Parent
commit
ba4826d4ce
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      scroll.c

+ 4 - 3
scroll.c

@@ -296,7 +296,7 @@ scrollup(int n)
 	int rows = 2;
 	struct line *scrollend = bottom;
 
-	if (n < 0) /* scroll by fraction of window rows, but at least one line */
+	if (n < 0) /* scroll by fraction of ws.ws_row, but at least one line */
 		n = ws.ws_row > (-n) ? ws.ws_row / (-n) : 1;
 
 	/* wind back scrollend pointer by one page plus n */
@@ -339,7 +339,7 @@ scrolldown(char *buf, size_t size, int n)
 	if (bottom == NULL || bottom == TAILQ_FIRST(&head))
 		return;
 
-	if (n < 0) /* scroll by fraction of window rows, but at least one line */
+	if (n < 0) /* scroll by fraction of ws.ws_row, but at least one line */
 		n = ws.ws_row > (-n) ? ws.ws_row / (-n) : 1;
 
 	bottom = TAILQ_PREV(bottom, tailhead, entries);
@@ -491,7 +491,8 @@ main(int argc, char *argv[])
 					if (rules[i].event == SCROLL_UP)
 						scrollup(rules[i].lines);
 					if (rules[i].event == SCROLL_DOWN)
-						scrolldown(buf, pos, rules[i].lines);
+						scrolldown(buf, pos,
+						    rules[i].lines);
 					goto out;
 				}
 			}