aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/less.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index d84df469c..719af5a0d 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -491,6 +491,11 @@ static void read_lines(void)
491 *p++ = c; 491 *p++ = c;
492 *p = '\0'; 492 *p = '\0';
493 } /* end of "read chars until we have a line" loop */ 493 } /* end of "read chars until we have a line" loop */
494#if 0
495//BUG: also triggers on this:
496// { printf "\nfoo\n"; sleep 1; printf "\nbar\n"; } | less
497// (resulting in lost empty line between "foo" and "bar" lines)
498// the "terminated" logic needs fixing (or explaining)
494 /* Corner case: linewrap with only "" wrapping to next line */ 499 /* Corner case: linewrap with only "" wrapping to next line */
495 /* Looks ugly on screen, so we do not store this empty line */ 500 /* Looks ugly on screen, so we do not store this empty line */
496 if (!last_terminated && !current_line[0]) { 501 if (!last_terminated && !current_line[0]) {
@@ -498,6 +503,7 @@ static void read_lines(void)
498 max_lineno++; 503 max_lineno++;
499 continue; 504 continue;
500 } 505 }
506#endif
501 reached_eof: 507 reached_eof:
502 last_terminated = terminated; 508 last_terminated = terminated;
503 flines = xrealloc_vector(flines, 8, max_fline); 509 flines = xrealloc_vector(flines, 8, max_fline);