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