]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-tree.c
ui-tree.c: do not add blank line when displaying blobs
[ps-cgit] / ui-tree.c
index 79332fc9eb22cc83bf4a098abcaf32102862b4d1..4bf372a6ce73b75984b1959149193b16266e4642 100644 (file)
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -54,8 +54,10 @@ static void print_object(const unsigned char *sha1, char *path)
                }
                idx++;
        }
-       htmlf(linefmt, ++lineno);
-       html_txt(buf + start);
+       if (start < idx) {
+               htmlf(linefmt, ++lineno);
+               html_txt(buf + start);
+       }
        html("</td></tr>\n");
        html("</table>\n");
 }