X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/e976df27952ca1e450c1c3d420532ac9f5e3036b..eac1b67:/ui-tree.c diff --git a/ui-tree.c b/ui-tree.c index caf6a9e..75ec9cb 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("|||
|