X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/523c133e2e5f7089a3d18ac23f2074b60991a7f0..6940b23b9e4698ba466a4616e4de77b986560ad3:/ui-tree.c diff --git a/ui-tree.c b/ui-tree.c index c608754..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("|||
|