X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/db8b8cb9467625cb8d9ecb67863aa67590e59cc0..d67cc7f9d556650438e421cdcda37bc52710bffd:/ui-tree.c diff --git a/ui-tree.c b/ui-tree.c index c608754..f64e6e0 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -22,8 +22,28 @@ static void print_text_buffer(const char *name, char *buf, unsigned long size) "%1$d\n"; html("
");
+ idx = 0;
+ lineno = 0;
+
+ if (size) {
+ htmlf(numberfmt, ++lineno);
+ while(idx < size - 1) { // skip absolute last newline
+ if (buf[idx] == '\n')
+ htmlf(numberfmt, ++lineno);
+ idx++;
+ }
+ }
+ html(" | \n");
+ }
+ else {
+ html("|||
|