(when fg
(shr-put-color start end :foreground (cadr new-colors)))
(when bg
- (shr-put-color start end :background (car new-colors)))))))
+ (shr-put-color start end :background (car new-colors))))
+ new-colors)))
;; Put a color in the region, but avoid putting colors on on blank
;; text at the start of the line, and the newline at the end, to avoid
(fgcolor (cdr (assq :fgcolor cont)))
(style (cdr (assq :style cont)))
(shr-stylesheet shr-stylesheet)
- overlays)
+ overlays actual-colors)
(when style
(setq style (and (string-match "color" style)
(shr-parse-style style))))
(insert (make-string (- width (current-column)) ? )))
(forward-line 1)))
(when style
- (shr-colorize-region
- (point-min) (point-max)
- (cdr (assq 'color shr-stylesheet))
- (cdr (assq 'background-color shr-stylesheet)))))
+ (setq actual-colors
+ (shr-colorize-region
+ (point-min) (point-max)
+ (cdr (assq 'color shr-stylesheet))
+ (cdr (assq 'background-color shr-stylesheet))))))
(if fill
(list max
(count-lines (point-min) (point-max))
(split-string (buffer-string) "\n")
(shr-collect-overlays)
- (cdr (assq 'background-color shr-stylesheet)))
+ (car actual-colors))
(list max
(shr-natural-width)))))))