X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/73b54f7d7e21fbb15c50e21eafe1737df96b2073..bf8293d3196d49d6c4a48b254a04415183ca2762:/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("|||
|