Improve diff display
gitile/pages.scm
212 | 212 | (cond | |
213 | 213 | ((equal? (diff-delta-status delta) GIT-DELTA-MODIFIED) | |
214 | 214 | (set! file-header | |
215 | - | `(p (@ (class "file-name")) ,(diff-file-path (diff-delta-old-file delta))))) | |
215 | + | `(p (@ (class "diff-file-name")) ,(diff-file-path (diff-delta-old-file delta))))) | |
216 | 216 | (else | |
217 | 217 | (set! file-header | |
218 | - | `(p (@ (class "file-name")) | |
218 | + | `(p (@ (class "diff-file-name")) | |
219 | 219 | ,(diff-file-path (diff-delta-old-file delta)) | |
220 | 220 | " unknown status " | |
221 | 221 | ,(number->string (diff-delta-status delta)))))) | |
… | |||
243 | 243 | (("") #t) | |
244 | 244 | ((line lines ...) | |
245 | 245 | (set! file-content | |
246 | - | (append file-content `((tr | |
247 | - | (td ,old-line) | |
248 | - | (td ,new-line) | |
246 | + | (append file-content `((tr (@ (class ,class)) | |
247 | + | (td ,(if (= old-line -1) "" old-line)) | |
248 | + | (td ,(if (= new-line -1) "" new-line)) | |
249 | 249 | (td ,origin) | |
250 | - | (td (@ (class ,(string-append class " diff-line"))) | |
250 | + | (td (@ (class "diff-line")) | |
251 | 251 | (pre ,line "\n")))))) | |
252 | 252 | (loop lines (+ old-line 1) (+ new-line 1)))))) | |
253 | 253 | 0)) |