greenhouse

greenhouse

forge suite

git clone [email protected]:greenhouse.git

fix(petal): keep line numbers out of tab stops in file view

commit1085825b056f9a9bdba925d3ea7f3851d1f06f1b
parent322994003fbbd7f9aa86c1ba1a1f9968eef1c3ad
authorlostduk <[email protected]>
date2026-10-14 19:58 +0000
petal/petal.c2+-
petal/style.css10+++++++++-

2 files changed, -2/+10

petal/petal.c

@@ -248,7 +248,7 @@ filepage(const char *path, const git_tree_entry *e) 		for (i = 0, n = 1; i < len; i += l + 1, n++) { 			nl = memchr(s + i, '\n', len - i); 			l = nl ? (size_t)(nl - s) - i : len - i;-			printf("<a id=\"l%zu\" href=\"#l%zu\">%4zu</a> ",+			printf("<a id=\"l%zu\" href=\"#l%zu\">%zu</a>", 				n, n, n); 			xmlencoden(s + i, l); 			putchar('\n');

petal/style.css

@@ -237,9 +237,17 @@ pre { 	overflow-x: auto; } +.blob {+	position: relative;+	padding-left: 7ch;+}+ .blob a {+	position: absolute;+	left: 0;+	width: 5ch;+	text-align: right; 	color: var(--a4);-	margin-right: 1ch; 	user-select: none; }