From a90e2aa4e1bd5c3a9657ce7d675943f4a265cc9f Mon Sep 17 00:00:00 2001 From: Onne Gorter Date: Wed, 7 Jan 2009 13:56:14 +0100 Subject: changed objects are outputted, allowing for selections of code only --- ui-tree.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'ui-tree.c') diff --git a/ui-tree.c b/ui-tree.c index 9876c99..2a8625c 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -18,8 +18,8 @@ static void print_object(const unsigned char *sha1, char *path) { enum object_type type; char *buf; - unsigned long size, lineno, start, idx; - const char *linefmt = "
"); idx = 0; - start = 0; lineno = 0; - while(idx < size) { + htmlf(numberfmt, ++lineno); + while(idx < size - 1) { // skip absolute last newline if (buf[idx] == '\n') { - buf[idx] = '\0'; - htmlf(linefmt, ++lineno); - html_txt(buf + start); - html(" |
| \n");
+
+ html("\n");
html("