Improve diff display again
gitile/pages.scm
| 206 | 206 | (diff-foreach diff | |
| 207 | 207 | (lambda (delta progress) | |
| 208 | 208 | (when file-header | |
| 209 | - | (set! content (append content (cons file-header `((table (@ (class "file-diff")) ,@(reverse file-content))))))) | |
| 209 | + | (set! content (append content (cons file-header `((table (@ (class "file-diff")) ,file-content)))))) | |
| 210 | 210 | (set! first-hunk #t) | |
| 211 | 211 | (set! file-content '()) | |
| 212 | 212 | (cond | |
… | |||
| 221 | 221 | ,(number->string (diff-delta-status delta)))))) | |
| 222 | 222 | 0) | |
| 223 | 223 | (lambda (delta binary) | |
| 224 | - | (set! file-content `((tr (@ (class "hunk-delim")) (td (@ (colspan 4)) "Binary data")))) | |
| 224 | + | (set! file-content | |
| 225 | + | `((tr (@ (class "hunk-delim")) (td (@ (colspan 4)) (p "Binary data"))))) | |
| 225 | 226 | 0) | |
| 226 | 227 | (lambda (delta hunk) | |
| 227 | 228 | (if first-hunk | |
… | |||
| 244 | 245 | ((line lines ...) | |
| 245 | 246 | (set! file-content | |
| 246 | 247 | (append file-content `((tr (@ (class ,class)) | |
| 247 | - | (td ,(if (= old-line -1) "" old-line)) | |
| 248 | - | (td ,(if (= new-line -1) "" new-line)) | |
| 248 | + | (td (@ (class "diff-line-num")) | |
| 249 | + | ,(if (= old-line -1) "" old-line)) | |
| 250 | + | (td (@ (class "diff-line-num")) | |
| 251 | + | ,(if (= new-line -1) "" new-line)) | |
| 249 | 252 | (td ,origin) | |
| 250 | 253 | (td (@ (class "diff-line")) | |
| 251 | - | (pre ,line "\n")))))) | |
| 254 | + | (pre ,line)))))) | |
| 252 | 255 | (loop lines (+ old-line 1) (+ new-line 1)))))) | |
| 253 | 256 | 0)) | |
| 254 | - | (append content (cons file-header `((table (@ (class "file-diff")) ,@(reverse file-content))))))) | |
| 257 | + | (append content (cons file-header `((table (@ (class "file-diff")) ,file-content)))))) | |