commit 8321dcb85b19a84bdf1940148dae734c90602753
parent eacdfff31c360f98faff60bca70295915380058d
Author: phoebos <ben@bvnf.space>
Date: Thu, 23 Sep 2021 18:00:46 +0100
ed: allow multiple lines of input
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ed.c b/ed.c
@@ -151,8 +151,8 @@ input(int lineno) {
}
if (tmp[0] == '.' && tmp[1] == '\n' && tmp[2] == '\0')
return;
- fprintf(stderr, "got %ld bytes: '%s'\n", n, tmp);
insert_line_before(tmp, n, lineno);
+ lineno++; /* to write following lines afterwards */
}
free(tmp);
}